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

PlayerAdded Event troubles?

Asked by 8 years ago

I wonder if I just need to add a simple wait() or a parameter, but anyways why doesn't this line of code work? (its from a larger script, but I don't think the rest is relevant)

this is inside a LocalScript, it works without the playeradded() event but otherwise this doesn't seem to work. at the top of the entire script as a whole, there is a wait(2) function called but I don't think that is messing this up here. so, whats the problem? if a single individual joins, it doesn't fire.

game.Players.PlayerAdded:connect(function()




        wait(4)
        sound = game.Workspace.BricksOfSky.ComeHere
        sound:play()

end)
0
I'm having the same issue. A script that used to work all of a sudden won't and it uses PlayersAdded() too. I think it's a roblox update bug... StoIid 364 — 8y
0
I don't understand the problem. It should fire once someone AFTER that current player joins. By the time the script starts running, the LocalPlayer is already going to be in the game and that event won't fire for him. If your problem is that it won't fire after someone else joins then it probably is, but maybe it's the sound that you can't hear? jakedies 315 — 8y
0
no the sound works without me calling the function, I've tested it. it still doesnt seem to work. ProgramsMan 100 — 8y

Answer this question