My Script works In Studios but Not Online for some reason? The Health loads up but you can't damage it at all. Works perfectly fine in Studios Please help. Script 1
local h = Instance.new("Humanoid") h.Parent = script.Parent local Human = script.Parent:WaitForChild("Humanoid") while true do wait(0.01) if script.Parent:FindFirstChild("Humanoid") == true then wait(2) script.Parent:FindFirstChild("Humanoid").MaxHealth = 5000 wait(2) script.Parent:FindFirstChild("Humanoid").Health = 5000 end end
Script 2
local Destroyed = script.Parent:FindFirstChild("Humanoid") local sound = script.Parent:FindFirstChild("Boom") local Human = script.Parent:WaitForChild("Humanoid") while true do wait(0.01) local Human = script.Parent:WaitForChild("Humanoid") if Destroyed.Health == 0 then sound:Play() script.Parent:remove() end end
Thank you.