Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 6 days ago

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

Log in to vote
0
Answered by
sheepposu 127
6 days ago

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)
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) codingMASTER398 4 — 6d
0
That's because it continuously went down till it was out of the world and therefore destroyed sheepposu 127 — 6d
0
it did'nt codingMASTER398 4 — 6d
0
oh, then idk sheepposu 127 — 6d
0
nvm codingMASTER398 4 — 6d
Ad

Answer this question