What I’m trying to do is make it so that when a remote event is fired, it starts to slowly decrease the player’s health overtime. I have no idea why it’s not working. All help is appreciated! This is a server script in StarterCharacterScripts.
local enabled = false
game.ReplicatedStorage["207"].OnServerEvent:Connect(function()
enabled = true
print(enabled)
end)
while wait(1) do
print("Check")
if enabled == true then
script.Parent.Humanoid.Health -= 1
end
end
