Bindable event not firing?

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

Bindable events are used to communicate between scripts on the same side (server-server or client-client). You should use a remote event instead

Yeah I tried using a remote event and it dident work, so I also tried bindable

I can’t find the event. Because you’re supposed to fire it using :FireServer()

Randomly fixed itself after changing something, Most likely a syntax mistake on my part.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.