This is my code, I cant figure out why it doesnt work. I get no errors, and it has never worked.
-- Variables:
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Clone = game.Lighting.Button:Clone()
local Torso = Character:WaitForChild("HumanoidRootPart")
-- Main code:
Humanoid.Health.Changed:Connect(function(health)
if health == Humanoid.Health then
if Humanoid.Health < 1 then
Clone.Parent = workspace
Clone.Position = CFrame.new(Torso.Cframe)
wait(1)
Clone.Anchored = true
end
end
end)

2 comments
Doesnt work, this is suppose to be in a Local script right?
yeah and if you want it to replicate just tell me :)