Hello, I am currently trying to cast the effects of guns to the server via RemoteEvents, by doing:
bullet.Touched:Connect(function(otherPart)
print(otherPart.Name, " touched")
if otherPart:IsDescendantOf(script.Parent.Parent.Parent) == false then
Damage:FireServer(Player, otherPart, DamageValue)
end
end)
Player is the local player, the otherPart is the part that the bullet touched, the DamageValue is the amount of damage the gun does.
When you do Damage:FireServer(...) from the client you don’t need to pass the player that’s automatically passed since the game knows which client you’re firing from.
That said the bullets being touched and damage being sent should be entirely handled on the server it’s extremely unsafe to handle this on the client.