Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How does this weapon not hurt the dummy, even though the hitbox is clearing touching them?

To replicate this problem, follow these steps:

  1. Open this file. https://mega.nz/file/SJAVRYyK#9xr92vqZEjhhYlSAE6AfUkapMh1XUKzHB9pGbHCUXz4

  2. Open the rbxm.

  3. Put the tool into the starterpack

  4. Place a dummy

  5. Press play and then see if you can hurt the dummy.

If nobody can hurt the dummy can any of you guys see what's wrong? I use that same script for the hitbox in other tools and it seems to work just fine. But not for this one. Thanks.

2 comments

0

I tried downloading the tool but when I did and open the file I got a error message please just put the damage script for the tool

0

I feel like you wouldn't really understand why it doesn't work unless you see for yourself by opening the file but alright.

1 answer

Heres the damage script.

local tool = script.Parent.Parent
local event = tool:WaitForChild("RemoteEvent")
local canattack = false
local Music = script.Parent.Sound

script.Parent.Touched:Connect(function(hit) 
	local ehum = hit.Parent:FindFirstChildOfClass("Humanoid")
	if canattack and ehum then
		ehum:TakeDamage(math.random(25, 30))
	end
end)

2 comments

0

canattack is false, so it does no damage

0

oh ok. fixed my problem

This discussion is preserved as it was. New answers, comments, and votes are closed.