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

My part moving script gives an error?

Asked by
Relatch 550 Moderation Voter
9 years ago

It says that Position is not a valid member of part, except Position is a property of part. Help?

while wait(0.1) do
    script.Parent.Position = script.Parent.Positon + Vector3.new(0, 1, 0)
    if script.Parent.Position == Vector3.new(-12, 5.5, 28) then
        script.Parent.Position = Script.Parent.Position - Vector3.new(0, 1, 0)
    end
end

1 answer

Log in to vote
1
Answered by
woodengop 1134 Moderation Voter
9 years ago

You misspelled Position on line 02, remember to check your spelling when coding.

while wait(0.1) do
    script.Parent.Position = script.Parent.Position + Vector3.new(0, 1, 0)
    if script.Parent.Position == Vector3.new(-12, 5.5, 28) then
        script.Parent.Position = Script.Parent.Position - Vector3.new(0, 1, 0)
    end
end

Ad

Answer this question