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

I need help moving a part?

local NewPart = Instance.new("Part")
NewPart.Parent = game.Workspace
NewPart.Anchored = true
NewPart.Position = Vector3.new("-24, 35.5, -4") 
wait(3)
NewPart.Anchored = false
if NewPart.Position == Vector3.new("-24, 12.5, -4")  then
	NewPart.Anchored = true
end

this just inserts it onto the workspace, it does nothing else! i have no clue why!

1 comment

0

What are is this script meant to do?

1 answer

✓ Accepted answer

Vector3.new() takes three numbers, x, y and z, as arguments. You used three numbers, but you entered them as a string, when they should be as follows:

local NewPart = Instance.new("Part", workspace)
NewPart.Anchored = true
NewPart.Position = Vector3.new(-24, 35.5, -4) 
wait(3)
NewPart.Anchored = false
if NewPart.Position == Vector3.new(-24, 12.5, -4)  then
	NewPart.Anchored = true
end

That if statement probably isn't going to work out how you expect it to, though. Hope this helped.

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