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)
1 | local model = bin.Marble:clone() |
2 |
3 | model.Parent = game.Workspace |
4 | model:MakeJoints() |
5 | model: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)
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:
1 | local model = bin.Marble:clone() |
2 | local humanoid = Instance.new( "Humanoid" ) |
3 | humanoid.Parent = model |
4 |
5 | model.Parent = game.Workspace |
6 | model:MakeJoints() |
7 | humanoid:MoveTo(mouse.hit.p) |