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

Why doesn't this playeradded event do it's thing, nothing gets printed and nothing happens?

Asked by
Echtic 128
4 years ago

It's a script inside the serverscriptservice, i tried using a local script and a remote event but the result was exactly the same, nothing. What am i doing wrong?

wait()
local players = game:GetService("Players")


function onPlayerAdded(player)

    local name = player.Name

        if name == "iiiAmericanLight"

    then

        print("Player is" .. name)

         local localscript1 = game.ReplicatedStorage:WaitForChild("Adminstuff"):WaitForChild("ChatthingyForMe"):Clone()
localscript1.Parent = player.PlayerGui
localscript1.Disabled = false

        end



end




players.PlayerAdded:Connect(onPlayerAdded)
0
try using local function instead of function MrCatDoggo 213 — 4y
0
nope, doesn't change a thing Echtic 128 — 4y
0
everything looks right, just make sure its in a server script(located on the server) and that your username is spelled right ForeverBrown 356 — 4y

Answer this question