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

help with playeradded event?

i seriously give up on this player added event, i make a function that works for every other method like mousebutton1down, but the moment i connect to playeradded, the script doesnt work can someone make a free model ofa gui that connects with the playeradded event, i know this is not a request site so if you cant do that can you give me a script, i tried and it does not work

2 comments

0

Can you post your Code so we can take a look at it? :l

0

Wait what are you trying to accomplish with the player added event specifically.

2 answers

game.Players.PlayerAdded:connect(function(plr)
plr:WaitForChild("PlayerGui").ScreenGui.Frame.TextLabel.Text = "Example on a way to manipulate a gui a when a player enters!"


end)

This is a way to access the playergui when the player joins, but note whats up there is a complete example,k? Enjoy :P

Also WaitForChild() Wait's until so and so is ready, so the script doesn't load before PlayerGui loads.

+1 if this helped, check mark if this answered :)

10 comments

0

WaitForDataReady is for Data Persistence. You are looking for the WaitForChild method.

0

Also WaitForDataReady() does work..

0

It's a incorrect format but, it works. Even though i'm not saving or loading data.

0

But then again i'm not loading data which proves it incorrect information.

0

But I use both waitfordataready() and waitforchild() , I also know the huge difference .

0

Anyway thanks for the correction.

0

It doesn't work because WaitForDataReady wouldn't return the PlayerGui of the player.

0

im trying to get a text label to load when the player joins the game, i tried my simple 3 line code which changes the visiblity of the text label but it doesnt seem to work when the player joins

0

also im kind of stuck on arguments, its very confusing to me, ca you make a code without using arguments

Here is the simple event...

Game.Players.PlayerAdded:connect(function(player)
--code here--
end end)

--if you want an example of one that's being used then pm me at AllianceScripter--

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