Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

local model = bin.Marble:clone()

model.Parent = game.Workspace
model:MakeJoints()
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)

1 comment

0

Sweet title, I hate that!

1 answer

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:

local model = bin.Marble:clone()
local humanoid = Instance.new("Humanoid")
humanoid.Parent = model

model.Parent = game.Workspace
model:MakeJoints()
humanoid:MoveTo(mouse.hit.p)

2 comments

0

Thanks!

0

No problem!

This discussion is preserved as it was. New answers, comments, and votes are closed.