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

Humanoid MoveToPoint math.random Not working?

Asked by 9 years ago

So I have a test dummy, and I want to to move around randomly.

I put this script into the Humanoid, but It comes with an error:

X cannot be assigned to

This is the script

while true do
local Humanoid = script.Parent
Humanoid.WalkToPoint.X = Vector3.new(math.random(100,100))
Humanoid.WalkToPoint.Z = Vector3.new(math.random(100,100))
wait (math.random(1,5))
end
0
I don't think you can change the x,y, or the z by itself, but I'll make sure. tumadrina 179 — 9y

2 answers

Log in to vote
0
Answered by
tumadrina 179
9 years ago

If you go on the wiki and scroll down to the properties, it says that x, y, and z are read only, meaning that you can't change them

0
So is there any way to change them? SpazzMan502 133 — 9y
0
You can change the whole thing at once, if you're not sure how to I can show you. tumadrina 179 — 9y
Ad
Log in to vote
0
Answered by 9 years ago
-- Local script --
-- Put this script into your StarterGui
wait()
game.Players.LocalPlayer.Character.Humanoid:MoveTo(Vector3.new(-100,100))

Answer this question