Edit: For some reason the script won’t print
print(Hit.Parent … " is hit parent")
but the script
print(Hit.Parent)
works fine. I guess the syntax is incorrect so I will have to look into it.
The craziest part is that there are only two periods in the first statement but no matter what I do it displays an ellipses … when I save the edit here. test …
Omg, is this some sort of windows auto correct? one dot. Two dots … Three dots … Four dots … Five dots …
------------------------------------------------------------------------ OP:
I’ve been using a Raycast melee system module to try and replace my region 3 combat system that stopped working. I have the weapon swinging and activating the raycast system but I’m not sure how to use the raycast module to determine if the part belongs to a HumanoidEvil (the humanoid type I want to damage).
The notes say: * RaycastHitbox.DetectionMode.PartMode
Description
— OnHit will return every hit part (in respect to the hitbox’s RaycastParams), regardless if it’s ascendant has a humanoid or not.
— OnHit will no longer return a humanoid so you will have to check it. The hitbox will not return parts it has already hit for the
— duration the hitbox has been active.
My local script in the weapon just determines which animation to play.
My server combat script is :
local RaycastHitbox = require(game:GetService("ReplicatedStorage").RaycastHitboxV4)
local Hitbox --- to be initialized when equipped
local Debris = game:GetService("Debris")
game.ReplicatedStorage.Remotes.Attack.OnServerEvent:Connect(function(plr,tool,combo)
local damage = tool.Configuration.Power.Power1
local Character = tool.Parent
local Players = game:GetService("Players")
if not plr.Cooldown.Value then
plr.Cooldown.Value = true
local confi = tool.Configuration
local damage = confi.Power.Power1
local Anim = confi.Anim["Swing"..combo]
print(Anim.Name)
local animator = plr.Character.Humanoid:LoadAnimation(Anim)
animator:Play()
local function Blow(Hit)
print(Hit.Parent.." is hit parent")
--humanoid:TakeDamage(damage) needs to occur here
end
Hitbox = RaycastHitbox.new(tool)
Hitbox.DetectionMode = RaycastHitbox.DetectionMode.PartMode
Hitbox.Visualizer = true
Hitbox:HitStart()
Hitbox.OnHit:Connect(Blow)
wait(1)
Hitbox:HitStop()
wait(1)
plr.Cooldown.Value = false
animator:Stop()
game.ReplicatedStorage.Remotes.Attack:FireClient(plr)
end
end)
Could anyone point me in the right direction? I’m currently trying to print the parent of the part that touches the raycast so I can find if it is HumanoidEvil but it doesn’t print anything or give any errors when I swing. Thanks for any help!