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

Attempt to reach GUI through Workspace, not working?

This is not working. I understand it's repetitive, but I just learned how to do this and I cannot do it right no matter what I try. Can anyone help? Thank you!

game.Players.PlayerAdded:connect(function(plr) -- Put this script in workspace
wait(3)
print("Player Has Entered Server")  -- Every time a player's entered this prints.
plr:WaitForDataReady("StarterGui").INTRO.IS.Visible = true
wait(3) 
plr:WaitForDataReady("StarterGui").INTRO.IS.Visible = false
plr:WaitForDataReady("StarterGui").INTRO.QFA.Visible = true 
wait(3) 
plr:WaitForDataReady("StarterGui").INTRO.IS.Visible = true 
wait(3) 
plr:WaitForDataReady("StarterGui").INTRO.IS.Visible = false

end)

5 comments

0

Wait, I did a script exactly like this, wierd.

0

Part of this script is from my old answer espacially the part "Put this in workspace" part, I remeber

0

Remember*

0

So? People reuse code. That's what this site is for.

0

I know, I also might know the problem to this question too.

2 answers

✓ Accepted answer

The WaitForDataReady() function is for DataPersistence, which is a semi-outdated service for storing player data. This is not likely what you're trying to access. StarterGui is the service used for cloning GUIs into players when they join. If you want to edit a player's GUI after they have joined, you should edit the GUI in their PlayerGui. Here is the fixed code:

game.Players.PlayerAdded:connect(function(plr) -- Put this script in workspace
wait(3)
print("Player Has Entered Server")  -- Every time a player's entered this prints.
plr.PlayerGui.INTRO.IS.Visible = true
wait(3) 
plr.PlayerGui.INTRO.IS.Visible = false
plr.PlayerGui.INTRO.QFA.Visible = true 
wait(3) 
plr.PlayerGui.INTRO.IS.Visible = true 
wait(3) 
plr.PlayerGui.INTRO.IS.Visible = false

end)

3 comments

0

WaitForDataReady Is still useful , I remeber answering a question like this because part of the question is from some old answer of mine.

0

I don't realize why this keeps getting downvoted. I'm explaining why the original script went wrong, as well as providing a fixed version.

0

Thank you. It's working great now. +1 Rep and Accepted Answer :)

It's their PlayerGui, not StarterGui.

game.Players.PlayerAdded:connect(function(plr) -- Put this script in workspace
wait(3)
print("Player Has Entered Server")  -- Every time a player's entered this prints.
repeat wait() until plr:findFirstChild("PlayerGui")
plr.PlayerGui.INTRO.IS.Visible = true
wait(3) 
plr.PlayerGui.INTRO.IS.Visible = false
plr.PlayerGui.INTRO.QFA.Visible = true 
wait(3) 
plr.PlayerGui.INTRO.IS.Visible = true 
wait(3) 
plr.PlayerGui.INTRO.IS.Visible = false

end)

4 comments

0

@Whoever bumped me back up, I appreciate it.

0

Why are you minused, something tells me someone made the mistake of using 'StarterGui' and then minused you.

0

MrFlimsy had more detail, but I gave you +1 rep for the help :D

0

Thank you anyways. @Hec, Probably.

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