it prints damaged but the player doesnt take any damage, works when u spawn for the first time tho
local players = game:GetService("Players")
local player = players.PlayerAdded:Wait()
local char = player.Character or player.CharacterAdded:Wait()
local hum = char.Humanoid
local function onTouch(Touch)
if Touch.Parent:FindFirstChild("Humanoid") ~= nil and script.Parent.Humanoid.Health > 0 then
hum:TakeDamage(1)
print("Damaged")
end
end
script.Parent.HumanoidRootPart.Touched:Connect(onTouch)

5 comments
remove the ~= nil
i already tried to remove the checks but it doesnt work, removed the ~= nil only and still doenst work
When you say it works when you spawn the first time do you mean it kills you? Dealdamage doesn’t work when force field is enabled
Also don’t use the hum that you get at the top, get the humanoid that you used in the if statement
i disabled the force field from the spawn it's weird because it prints damaged the checks passed trough but i dont take damage i tried with hum.Health = hum.Health - 1 didnt work still