** So my problem is the touch function… I have this hitbox that is supposed to damage the player then delete itself. But if the Player isn't moving it does not do any damage. I've tried gettouchedparts but that was too complicated for me so I didn't know how to put it in my script. Is there any alternative way to fix this ?**
hitbox.Touched:Connect(function(hit)
if hit.Parent.Name ~= Player.Name then
local gethum = hit.Parent:FindFirstChild("Humanoid")
if gethum then
hitbox.CanCollide = false
hitbox:Destroy()
gethum:TakeDamage(5)

3 comments
Please don't write everything on the same row, it's much easier to read if you tab in
Now im having an error that Ive tried to fix called " is not a valid member of Workspace "Workspace"" How should I fix this?
With the local hitbox make sure to locate that part the player will touch to activate the script. e.g. (workspace.replace with part position)