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

I need help with player added?

Asked by 8 years ago
Edited 8 years ago

I have a script that uses the PlayerAdded event to work but it doesn't work and i have seen some other people say that it doesn't work for them either. Any fixes? It was working before But it just stopped working a couple hours ago...

game.Players.PlayerAdded:connect(function(plr)
    local PlayerValues = Instance.new("Folder", plr)
    PlayerValues.Name = "PlayerValues"
    local PlayerPlaying = Instance.new("BoolValue", PlayerValues)
    PlayerPlaying.Name = "Playing"
    local AFK = Instance.new("BoolValue", PlayerValues)
    AFK.Name = "AFK"
    local Money = Instance.new("IntValue", PlayerValues)
    Money.Name = "Money"
    Money.Value = ds1:GetAsync(plr.UserId) or 0
    ds1:SetAsync(plr.UserId, Money.Value)
    Money.Changed:connect(function()
        print("Saving Data")
        ds1:SetAsync(plr.UserId, Money.Value)
        print(plr.Name.."'s Data of "..Money.Value..""..Money.Name.." has been saved!")
        end)
end)
0
can you... Um post the script so we can help? NetworkMan243 65 — 8y
0
PlayerAdded doesn't fire when the player joins offline (i.e. play solo in studio) if that's how you're testing it. 1waffle1 2908 — 8y
0
Heh, did you use SpooksHD's tutorial? itsJooJoo 195 — 8y
0
It also might not work if the person is the first in the server. GoldenPhysics 474 — 8y
0
We all need help. Some form of help... mostly mental help. The cure? Rocket League. Scarious 243 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

Actually there are rumors that ROBLOX actually broke the PlayerAdded event.

Ad
Log in to vote
0
Answered by 8 years ago
Edited 8 years ago
game.Players.PlayerAdded:connect(function(player)
     print(player.UserId)
end)

I have an event that seems to semi work when a player is added, let me test to ensure.

This seems to work fine.

Answer this question