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

My custom commands script isn't working?

Asked by
Relatch 550 Moderation Voter
8 years ago

Everything is working, except for when I use smallhead. It doesn't remove the hats, which is annoying. Help?

game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
        if msg == "bighead" then
            player.Character.Head.Mesh.Scale = Vector3.new(3, 3, 3)
        elseif msg == "smallhead" then
            player.Character.Head.Mesh.Scale = Vector3.new(0.7, 0.7, 0.7)
        elseif msg == "normalhead" then
            player.Character.Head.Mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
        elseif msg == "respawn" then
            if player.Character.Humanoid.Health > 0 then
                player:LoadCharacter()
            end
        elseif msg == "sparkles" then
            if not player.Character.Torso:FindFirstChild("Sparkles") then
                local sparkles = Instance.new("Sparkles", player.Character.Torso)
            end
        elseif msg == "fire" then
            if not player.Character.Torso:FindFirstChild("Fire") then
                local fire = Instance.new("Fire", player.Character.Torso)
            end
        elseif msg == "shutdown" then
            if player.Name == "Relatch" then
                for i, v in pairs(game.Players:GetPlayers()) do
                    v:Kick()
                end
            end
        end
    end)
end)
0
Did you copy my script from yesterday?:3 jk iSvenDerp 233 — 8y
0
maybe :3 Relatch 550 — 8y

1 answer

Log in to vote
3
Answered by
KoreanBBQ 301 Moderation Voter
8 years ago

Hats are located inside your Character and not inside your Player.

Try L7

            for i, v in pairs(player.Character:GetChildren()) do
0
already fixed this, but thanks for the answer! Relatch 550 — 8y
Ad

Answer this question