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

MoveTo is broken or something?Your title should be specific! Describe your problem concisely.

Asked by 7 years ago

f9 says MoveTo is not a valid member or Part when I test

local spawnPos = script.Parent local pos = spawnPos

while wait(30) do -- Spawn Delay local noob1 = game.ServerStorage.Noobs.Noob:clone() noob1.Parent = game.Workspace noob1:MoveTo(pos.Position + Vector3.new(0,1,0))

end

I thought it was on my part but a few days later when I took some free model tool that spawns models in game, it gave that MoveTo error.

bin = script.Parent

function onButton1Down(mouse)

1local model = bin.Marble:clone()
2 
3model.Parent = game.Workspace
4model:MakeJoints()
5model:MoveTo(mouse.hit.p)

end

function onSelected(mouse) mouse.Icon = "rbxasset://textures\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end

bin.Selected:connect(onSelected)

0
Sweet title, I hate that! FlippinAwesomeCrew 62 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

MoveTo is not a valid member of Part because MoveTo has to be used on a Humanoid. Parts do not have this function. I hope this helped!

i.e:

1local model = bin.Marble:clone()
2local humanoid = Instance.new("Humanoid")
3humanoid.Parent = model
4 
5model.Parent = game.Workspace
6model:MakeJoints()
7humanoid:MoveTo(mouse.hit.p)
0
Thanks! yodaxvader 0 — 7y
0
No problem! starwars5251977 48 — 7y
Ad

Answer this question