Med_App
(MedApp)
#1
I have a server script that handles my hitboxes for weapons.
Essentially, this is what my code does:
RunService.Stepped:Connect(function()
if DoDamage then
local Parts = Hitbox:GetTouchingParts()
for i,v in pairs(Parts) do
Damage(v)
end
end
end)
What I want to know is if this will effect the server in anyway (e.g. lag server)?
2 Likes
Solwra
(Solwra)
#2
You cannot use RunService inside a server script.
Med_App
(MedApp)
#3
Yes you can. The code works.
yungpharma
(GooseCreekGrimReaper)
#4
No. GetTouchingParts extremely inexpensive, however in terms of Melee (I don’t know your use case) it would work far better to use this:
But for projectiles this should be fine.