Ok so, it just wont fire I setup a print on the reciving end of the event and it dosen’t get the event.
Ive made sure it was running on a client and it was
function Weapon:Fire(Name: string)
local Origin = Camera.CFrame.Position
local Direction = Camera.CFrame.LookVector * 500
local Params = RaycastParams.new()
Params.FilterType = Enum.RaycastFilterType.Blacklist
Params.FilterDescendantsInstances = {Character}
local Raycast = workspace:Raycast(Origin, Direction, Params)
if Raycast then
local RayPart = Raycast.Instance
HitTarget:Fire(RayPart.Parent, GunName)
if RayPart.Parent:FindFirstChild("Humanoid") then
HitTarget:Fire(RayPart, GunName)
end
end
end
No idea why, it does run HitTarget:Fire as I tested with a print when firing.
But the server just dosen’t seem to get it