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

script.Parent.Position = script.Parent.Position - Vector3.new(0, 0.5, 0) error?

i has a line of code in other lines of code. this line of code shows an error of 11:58:32.616 - Workspace.confetti.Part.Script:17: attempt to index field 'Parent' (a nil value) when i run the code. i am trying to make confetti slowly rain. i have been trying to fix this, its not working. can somebody help me? code:

script.Parent.Position = script.Parent.Position - Vector3.new(0, 0.5, 0)

1 answer

That's not how it works, this is how it works -

script.Parent.Position = Vector3.new(script.Parent.Position.X, script.Parent.Position.Y - 0.5, script.Parent.Position.Z)

5 comments

0

works but does not work. it works then displays this in output: 12:15:32.352 - Workspace.confetti.Part.Script:17: attempt to index field 'Parent' (a nil value). (THIS IS WHEN THE CONFETTI HAS BEEN DESTROYED)

0

That's because it continuously went down till it was out of the world and therefore destroyed

0

it did'nt

0

oh, then idk

0

nvm

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