I don’t understand why other players/ rigs are not being damaged when being hit with the part.
local TS = game:GetService("TweenService")
local DS = game:GetService("Debris")
game.ReplicatedStorage:WaitForChild("Hollowfire").OnServerEvent:Connect(function(plr, eventtype, g, g2)
print("Got function")
local Character = plr.Character
if eventtype == "Proj" then
local Start = Character["Right Arm"].Position
local End = g
local MouseCFrame = g2
local Duration = (End - Start).Magnitude / 80
local Hollow = game.ServerStorage.Part:Clone()
Hollow.CFrame = Character["Right Arm"].CFrame
Hollow.Hitbox.CFrame = Hollow.CFrame
Hollow.Parent = workspace
local HollowTween = TS:Create(Hollow, TweenInfo.new(Duration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {CFrame = MouseCFrame})
HollowTween:Play()
local Damaged = false
Hollow.Hitbox.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") and Hit.Parent.Name ~= plr.Name and Damaged == false then
Damaged = true
Hollow:Destroy()
local EnemyCharacter = Hit.Parent
EnemyCharacter.Humanoid.Health -= 10
end
end)
DS:AddItem(Hollow, Duration + 0.1)
print("Finished")
end
end)