Script.Parent = nil?

Ello!
For some reason I keep getting this error for my simple text script:

I’m not sure how this works since if script.parent = nil then the script shouldn’t be able to give that error in the first place. Here is my script and setup
Script:

local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status")

script.Parent.Text = Status.Value -- this is line 3, the line throwing the error while installing terror

Status:GetPropertyChangedSignal("Value"):Connect(function()
	
	script.Parent.Text = Status.Value
	
end)

Setup:
Proof

It shouldn’t… you’re not destroying it somehow are you? And what UI/VM are you using in the first image?

1 Like

I’m not doing anything to it. It is in StarterGui so it gets cloned to the players character and deleted when the player dies. But other then what roblox does with it, I ain’t doing nothing to it.

and that UI is from the error reports log for my game on the roblox website

Try to ask around your player base or look through your bug reports for reproducible steps. Seems weird that it is spiking only at that time which could indicate some sort of Roblox bug or just someone attempting to break your code somehow.

1 Like

That spike is just me and my friend playing. no one plays this game yet.
It seems to just happen all the time.

@rocketman392

your status.Value== nil and you cant set nil for as text

just check
if Status.Value~=nil

if Status.Value==nil then
  return
end

add this before the text is changed

1 Like

Dude, I thinks thats it, thanks so much. Give me a virtual high five: :raised_hand:

1 Like

:raised_hand:

:grinning: nice (character limit 30)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.