Hello, I want the player to walk to a part when they press the text button, Heres my script:
local player = game.Players.LocalPlayer
local humanoid = player.Character.Humanoid
local part = game.Workspace.CameraPart
local plr = game.Players.LocalPlayer
local chr = plr.Character
script.Parent.MouseButton1Click:Connect(function()
if player.Character then
player.Character.Humanoid:MoveTo(part.Position)
end
I've tried other scripts but I deleted them and don't remember them, can someone help me, please?

5 comments
What's wrong exactly? Any errors?
The player won't move.
too early, add an end) and wait for MoveToFinished.
I do have an end), in the developer console it says "Player:Move called, but player currently has no humanoid"
Wait for the humanoid to exist, then, using WaitForChild().