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
I dont know why it is joined together
YOU NEED TO PUT LUA BLOCKS
and what did you expect to set material on meshes