Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make player walk to point?

Asked by 6 years ago

How do I make a player walk to a point with player having no control of his character until I want him to? I've tried this with no luck:

game.Players.PlayerAdded:connect(function(plrname)
plrname.CharacterAdded:connect(function(character)
    if character and character:findFirstChild("Humanoid") then
        while true do
            wait()
            character.Humanoid.WalkToPoint(-124, 1000.6, -128)
        end


    end
end)
end)

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

WalkToPoint is a property of Humanoid so you can't use it like a function. Instead you assign the property with a new value.

game.Players.PlayerAdded:Connect(function(plrname)
    plrname.CharacterAdded:Connect(function(character)
        if character and character:FindFirstChild("Humanoid") then
            while wait() do                         
                character.Humanoid.WalkToPoint = Vector3.new(-124, 1000.6, -128)            
            end     
        end
    end)
end)
1
Thank you! TheGreenSuperman 85 — 6y
Ad
Log in to vote
0
Answered by
tek_o 56
6 years ago

Make it local

Answer this question