local chr = script.Parent
local hum = chr.Humanoid
local endpos = game.Workspace.endpos
task.wait(4)
print("works??")
hum:MoveTo(endpos.Position)
print("works2??")
I inserted this script into r6 model yet it doesn’t seem to work, I am not sure why
Change this to
local char = game.Players.LocalPlayer.Character
local hum = char:WaitForChild("Humanoid")
If not using the local player’s character, keep script.Parent
but replace humanoid with char:WaitForChild("Humanoid")
i tried this it still doesn’t work, the dummy doesn’t move at all
Can you give me a video of it?
it doesn’t move at all the script seems to work because the print statements run
I rewrote the code. Use :PivotTo() for moving characters from now on.
local Plr = game.Players.LocalPlayer
local Char = Plr.Character or Plr.CharacterAdded:Wait()
local EndPos = workspace:WaitForChild("endpos")
wait(4)
Char:PivotTo(EndPos.CFrame)
riblolox
(charcoal)
April 10, 2025, 12:50am
7
Using the method PivotTo would instantly teleport the character to the given CFrame.
2 Likes
is this a localscript? Because localscripts do not run unless as a descendant of player or character
nvm if it prints then it wouldn’t be
riblolox
(charcoal)
April 10, 2025, 12:51am
9
Open the Output menu by pressing the button in the View tab and check for any errors.
1 Like
Ah, I seem to misunderstood the post then.
In that case, player characters do not respond to :MoveTo(). You might need to script the movement yourself.
sorry for not clarifying, this is a r6 rig that I’m trying to make it walk to a specific point
Pretty sure they do, I’m pretty confident I’ve used it before
spvp1234
(NVIDIAsThug)
April 10, 2025, 12:54am
13
Did you delete animate object or smth?
It could be something with the humanoid like WalkSpeed
Might be wrong.
Not the user’s character? If that isn’t the case, then use a server script for it. Local scripts are for controlling client-sided things.
riblolox
(charcoal)
April 10, 2025, 12:55am
15
MoveTo works on player characters as long as it doesn’t get interrupted by the player.
riblolox
(charcoal)
April 10, 2025, 12:55am
16
Okay so to clarify, this is running on a server script that is parented to an NPC?
yes thats correct (word limit)
Is the R6 rig perhaps anchored or something?
If the script is a serverscript and the prints are printing fine and there are no errors, something like this seems to be the most reasonable issue
1 Like
the dummy isn’t anchored i tried testing it again on a different r6 dummy
riblolox
(charcoal)
April 10, 2025, 12:57am
20
Okay.
First check to see if any of the connected parts are anchored as @PANDASonNOOB said.
Also check to make sure that the Humanoid’s WalkSpeed is not set to 0.
1 Like