Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Need Help this gold death effect kill script?

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)

3 comments

0

I dont know why it is joined together

0

YOU NEED TO PUT LUA BLOCKS

0

and what did you expect to set material on meshes

2 answers

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.