New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
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 3 months 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 391 Moderation Voter
3 months 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 30 — 3mo
0
That's because it continuously went down till it was out of the world and therefore destroyed sheepposu 391 — 3mo
0
it did'nt codingMASTER398 30 — 3mo
0
oh, then idk sheepposu 391 — 3mo
0
nvm codingMASTER398 30 — 3mo
Ad

Answer this question