Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

help with playeradded event?

Asked by 10 years ago

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

0
Can you post your Code so we can take a look at it? :l TheeDeathCaster 2368 — 10y
0
Wait what are you trying to accomplish with the player added event specifically. HexC3D 830 — 10y

2 answers

Log in to vote
0
Answered by
HexC3D 830 Moderation Voter
10 years ago
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 :)

0
WaitForDataReady is for Data Persistence. You are looking for the WaitForChild method. Articulating 1335 — 10y
0
@Art, read this comment I wrote way before , https://scriptinghelpers.org/questions/6597/can-someone-list-the-waitforready-things HexC3D 830 — 10y
0
Also WaitForDataReady() does work.. HexC3D 830 — 10y
0
It's a incorrect format but, it works. Even though i'm not saving or loading data. HexC3D 830 — 10y
View all comments (6 more)
0
But then again i'm not loading data which proves it incorrect information. HexC3D 830 — 10y
0
But I use both waitfordataready() and waitforchild() , I also know the huge difference . HexC3D 830 — 10y
0
Anyway thanks for the correction. HexC3D 830 — 10y
0
It doesn't work because WaitForDataReady wouldn't return the PlayerGui of the player. Articulating 1335 — 10y
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 namelessassasin 30 — 10y
0
also im kind of stuck on arguments, its very confusing to me, ca you make a code without using arguments namelessassasin 30 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

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--

Answer this question