Follow Menu

local propMenuGroup = script:GetCustomProperty("MenuGroup"):WaitForObject()
local _player = Game.GetLocalPlayer()
--_player.isVisibleToSelf = false --(client only)
local _mPos = nil
local _mRot = nil

local _startPos = propMenuGroup:GetPosition()

-- useful for when interacting with menu perhaps..
--player.isVisibleToSelf = false (client only)
--player:AddImpulse(Vector3.UP * 1000)

function Tick()
    -- get the menu to stay behind the player
    --_fPos = _player:GetWorldPosition() + Vector3.New(25,20,10)
    _mPos = _player:GetWorldPosition()
    _mRot = _player:GetWorldRotation()
    propMenuGroup:SetWorldPosition(_mPos)
    propMenuGroup:SetWorldRotation(_mRot)
end

Latest Posts