If player has a forcefield then show it on text, but when forcefield is removed i get an error?
Asked by
8 years ago Edited 8 years ago
I have a script in a Gui that tells the player if they have a forcefield on screen. The problem i have is once the forcefield is removed, i get an error instead of making the text invisible.
Error: ForceField is not a valid member of Model.
01 | local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Character |
05 | if player.ForceField then |
06 | script.Parent.Visible = true |
07 | script.Parent.Text = "ForceField" |
09 | script.Parent.Visible = false |
Any help pls?