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

What's wrong with this code?

Asked by
Sxerks3 65
8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
local playrr = game.Players

game.Players.PlayerAdded:connect(function(player)
    script.Parent.MouseButton1Click:connect(function()
        repeat wait() until player.Character
        local hatID = 20298484
        local hat = game:GetService("InsertService"):LoadAsset():GetChildren()[1]
        hat.Parent = player.Character
        playrr.PlayerGui.ScreenGui.Frame.Visible = false
    end)
end)

game.Workspace.ChildAdded:connect(function(player)
    local name = player.Name
    local playerinplayers = game.Players:FindFirstChild(player.Name)
    playerinplayers.CanLoadCharacterAppearance = false
end)

I'm trying to get it so that when you click on a class, you change character and the GUI disappears.

1
Providing errors, if any, and what it is doing will help others solve your problem better. Any information about this you can give will help us! Necrorave 560 — 8y

Answer this question