local RE = game.ReplicatedStorage:WaitForChild("TPBack") local player = game.Players.LocalPlayer
RE.OnClientEvent:Connect(function(player,pos) player.Character.HumanoidRootPart.CFrame = pos.CFrame + Vector3.new(0,3,0) end)
local RE = game.ReplicatedStorage:WaitForChild("TPBack") local player = game.Players.LocalPlayer
RE.OnClientEvent:Connect(function(player,pos) player.Character.HumanoidRootPart.CFrame = pos.CFrame + Vector3.new(0,3,0) end)
What is parameter one? You have conflicting variable names since player on your second line is has the same name as player in the function. If you are passing another player which is not the localplayer in the function, make sure that is a player object.
If you are changing the localplayers Humanoid Root Part, then change the name of the player variable on line two to something like LocalPlayer and change the line inside the function to LocalPlayer.Character.HumanoidRootPart.CFrame = pos.CFrame + Vector3.new(0,3,0)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
you shouldnt define player because it is already defined on the on client event. also what is being received from the on client seems to be a part not a player object