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

Hat giver, has no errors in console or script, but it still doesnt work after trying multiple times?

Asked by 4 years ago
local hat = game.ServerStorage["Commander+"]

script.Parent.Touched:Connect(function(h)
    local plr = game.Players:GetPlayerFromCharacter(h.Parent)
    if plr then
        if not h.Parent:FindFirstChild("Commander+") then
            hat:Clone().Parent = h.Parent
        end
    end
end)

I'm trying to make it give the player a hat that is an accessory in ServerStorage (the hat itself is an union) there is no errors in the console or the script itself but it still doesn't work

Answer this question