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
9 years ago

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

01game.Players.PlayerAdded:connect(function(player)
02    player.Chatted:connect(function(msg)
03        if msg == "bighead" then
04            player.Character.Head.Mesh.Scale = Vector3.new(3, 3, 3)
05        elseif msg == "smallhead" then
06            player.Character.Head.Mesh.Scale = Vector3.new(0.7, 0.7, 0.7)
07        elseif msg == "normalhead" then
08            player.Character.Head.Mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
09        elseif msg == "respawn" then
10            if player.Character.Humanoid.Health > 0 then
11                player:LoadCharacter()
12            end
13        elseif msg == "sparkles" then
14            if not player.Character.Torso:FindFirstChild("Sparkles") then
15                local sparkles = Instance.new("Sparkles", player.Character.Torso)
View all 29 lines...
0
Did you copy my script from yesterday?:3 jk iSvenDerp 233 — 9y
0
maybe :3 Relatch 550 — 9y

1 answer

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

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

Try L7

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

Answer this question