I use this script, but its not working, I tried fixing everything as possible. Help please.
local Players = game:GetService('Players') local toolName = 'GoldenSword'
Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) local Humanoid = Character:WaitForChild('Humanoid') Humanoid.Died:Connect(function() if Character:FindFirstChild(toolName) or Player.Backpack:FindFirstChild(toolName) then for _, v in pairs(Character:GetChildren()) do if v.ClassName == "Torso" then v.BrickColor = BrickColor.new("Gold") v.Material = Enum.Material.Neon end end end end) end)
Instead of setting the whole body color, you can access to "Body Colors" inside character. Example:
game.Players.PlayerAdded:Connect(function(player) local bodycolor = player.Character["Body Colors"] bodycolor.TorsoColor3 = Color3.new(255,0,0) bodycolor.RightLegColor3 = Color3.new(255,0,0) bodycolor.LeftLegColor3 = Color3.new(255,0,0) bodycolor.LegArmColor3 = Color3.new(255,0,0) bodycolor.RightArmColor3 = Color3.new(255,0,0) bodycolor.HeadColor3 = Color3.new(255,0,0) end)
(This might not work, but this is a guide, you should figure it out yourself though)
uh dos dis work hehe I no test
local Players = game:GetService('Players') local toolName = 'GoldenSword' Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) local Humanoid = Character:WaitForChild('Humanoid') Humanoid.Died:Connect(function() local creator = Humanoid:FindFirstChild'creator' if creator ~= nil then local killer = creator.Value if killer.Character:FindFirstChild(toolName) then for i,v in pairs(Character:GetChildren()) do if v:IsA'BasePart' then v.Material = 'Neon' v.BrickColor = BrickColor.new('Gold') end end end end end end) end)