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

Need Help this gold death effect kill script?

Asked by 3 years ago

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)

0
I dont know why it is joined together CalarqnicKen 8 — 3y
0
YOU NEED TO PUT LUA BLOCKS Xapelize 2658 — 3y
0
and what did you expect to set material on meshes Xapelize 2658 — 3y

2 answers

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago

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)

Ad
Log in to vote
0
Answered by 3 years ago

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)

Answer this question