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

What wrong with this script?

Workspace.PIDS.PIDS.TextLabel.Text = "A"
Wait(5)
Workspace.PIDS.PIDS.TextLabel.Text = "B"
Wait(5)
Workspace.PIDS.PIDS.TextLabel.Text = "C"
Wait(5)
Workspace.PIDS.PIDS.TextLabel.Text = "D"
Wait(5)

Workspace>PIDS(Part)>PIDS(SurfaceGui)>Frame>TextLabel

l need a fix script

Wrong : TextLabel is not a valid member of SurfaceGui

2 answers

✓ Accepted answer

You forgot to add 'Frame' in your path,

Workspace.PIDS.PIDS.Frame.TextLabel.Text = "A"
Wait(5)
Workspace.PIDS.PIDS.Frame.TextLabel.Text = "B"
Wait(5)
Workspace.PIDS.PIDS.Frame.TextLabel.Text = "C"
Wait(5)
Workspace.PIDS.PIDS.Frame.TextLabel.Text = "D"
Wait(5)


The #1 error I can see are the Waits. Remember, lua is cap-sensitive, so you have to type it accordingly to how it works, so what you have to do is Lowercase the Waits, and #2, try changing both names of PIDS to something else other then them both having the same name, if that doesn't work then try this;

if game:FindService("Workspace")and game.Workspace:FindFirstChild("PIDS")and game.Workspace.PIDS:FindFirstChild("OTHER NAME HERE")and game.Workspace.Pids.OTHER NAME HERE:FindFirstChild("Frame")and game.Workspace.PIDS.OTHER NAME HERE.Frame:FindFirstChild("TextLabel")then
game.Workspace.PIDS.OTHER NAME HERE.TextLabel.Text = "A"
wait(5)
game.Workspace.PIDS.OTHER NAME HERE.TextLabel.Text = "B"
wait(5)
game.Workspace.PIDS.OTHER NAME HERE.TextLabel.Text = "C"
wait(5)
game.Workspace.PIDS.OTHER NAME HERE.TextLabel.Text = "D"
wait(5)
end

Last but not least, the script thinks TextLabel is within SurfaceGui, so it went there, and when the script didn't see it as existant, it gave you an error because TextLabel, as you typed it, is Parented into the Frame within SurfaceGui. Hope this helped!

1 comment

0

Tested,failed(PIDS is not a valid member of Part)(othre name=Gui=PIDS(SurfaceGui))

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