#Help me make hitboxes

1 messages · Page 1 of 1 (latest)

velvet girder
#

I used a old script from a tutorial but it was old so it didn’t work. hitbox.Parent = workspace
hitbox.CanCollide = false
hitbox.Anchored = true
hitbox.Size = Vector3.new(7,7,7)
hitbox.BrickColor = BrickColor.new("Really red")
hitbox.Transparency = .5
hitbox.CFrame = plr.Character.HumanoidRootPart.CFrame = CFrame.new(0,0, -5)
game.Debris:AddItem(hitbox,1)
local hitboxcooldown = false
hitbox.Touched:Connect(function(hit)
if hit.Parent.Name ~=plr.Name and hit.Parent:FindFirstChild("Humanoid") then
if hitboxcooldown == true then return end
hitboxcooldown = true

    hit.Parent:FindFirstChild("Humanoid"):TakeDamage(5)
    task.wait(1)
    hitboxcooldown = false
    
end
end)

end)

vale loom
ivory ocean
#

...

#

dude

#

did you make a variable for hitbox?

#

also are you even sure if its written properly

velvet girder
real sandal
velvet girder
#

Yes

#

Yes I would

real sandal
#

When you ran it, what happened? What actually is the issue? Errors? Warnings?

velvet girder
real sandal
velvet girder
lunar vaultBOT
#

studio** You are now Level 1! **studio

real sandal
velvet girder
velvet girder
real sandal
velvet girder
#

No like nothing happened when I used the line

real sandal
velvet girder
#

No errors no nothing

real sandal
real sandal
velvet girder
real sandal
# velvet girder

I was mentioning that line because it's incorrectly typed. There should have been an error relating to that, so you did not fix that error.

It's just plain wrong. Maybe instead of the second = you meant to use *

velvet girder
#

Ohhhhh

#

My dumbass😭