#the damage is not damaging the enemy
11 messages · Page 1 of 1 (latest)
here's the script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local VFX = ReplicatedStorage.VFX
local VFXEvent = ReplicatedStorage.VFXEvent
local RTG = VFX.RTG
local MuchachoHitbox = require(ReplicatedStorage.MuchachoHitbox)
local function TakeDamage(humanoid, owner, damage)
local character = humanoid.Parent
if character and character:FindFirstChild("Humanoid") and character.Name ~= owner then
humanoid:TakeDamage(damage)
end
end
local function createHitbox(part, lifetime, owner)
local randomYPosition = math.random(-5, 5)
local randomZPosition = math.random(-6, -3)
local hitbox = MuchachoHitbox.CreateHitbox()
hitbox.Size = Vector3.new(3,3,5)
hitbox.CFrame = part.CFrame * CFrame.new(math.random(-5, 2),math.random(-5, 2),math.random(-5, 2))
hitbox.Touched:Connect(function(hit, hum)
TakeDamage(hum, owner, 10)
end)
hitbox:Start()
task.wait(lifetime)
hitbox:Stop()
end
VFXEvent.OnServerEvent:Connect(function(player, value)
local character = player.Character
local humanoidrootpart, humanoid = character:WaitForChild("HumanoidRootPart"), character:WaitForChild("Humanoid")
local wepon = RTG.Wepon:Clone()
wepon.Parent = workspace
wepon.CFrame = humanoidrootpart.CFrame * CFrame.new(0,0,-3)
wepon.CanCollide = false
humanoidrootpart.Anchored = true
game.Debris:AddItem(wepon, 3)
for i = 1, 50 do
createHitbox(wepon, 0.095, character.Name)
createHitbox(wepon, 0.095, character.Name)
createHitbox(wepon, 0.095, character.Name)
end
humanoidrootpart.Anchored = false
end)
** You are now Level 8! **
Put a print statement in the damage function
Also add another rig, just a plain block one this time
@half plaza
ok
it worked