When sending WorldPosition to server from a attachment it sends the character

So I’m trying to make a gun with FastCast: Redux but when I’m debug bc. of lots of errors that comes up:
Screenshot (49)

Client Script: short

Tool.Activated:Connect(function()
	local Origin = FirePoint.Position
	local Direction = (Mouse.Hit.Position - Origin).Unit
	
	ReplicatedStorage.Events.GunCast:FireServer(Player, Vector3.new(Origin.X, Origin.Y, Origin.Z), Vector3.new(Direction.X, Direction.Y, Direction.Z), 900, 1000, 20)
end)

Server Script: looong

local function GunCast(Player, Origin, Direction, Velocity, Range, Damage)
	local FastCastRay = FastCastRedux.new()
	local FastCastParams = RaycastParams.new()
	local FastCastBehavior = FastCastRedux.newBehavior()
	FastCastBehavior.MaxDistance = Range
	FastCastBehavior.RaycastParams = FastCastParams
	FastCastBehavior.AutoIgnoreContainer = false
	FastCastBehavior.CosmeticBulletContainer = workspace.BulletFolder
	FastCastBehavior.CosmeticBulletTemplate = BulletTemplate
	
	FastCastParams.FilterType = Enum.RaycastFilterType.Blacklist
	FastCastParams.FilterDescendantsInstances = {Player.Character, workspace.BulletFolder}
	print(Origin, Direction)
	--FastCastRay:Fire(Origin, Direction, Velocity, FastCastBehavior)
	
	FastCastRay.LengthChanged:Connect(FastCastOnLengthChange)
	FastCastRay.RayHit:Connect(FastCastOnHit, Damage)
end

Thanks!

You dont need to pass Player when firing a server script from the client. It automatically does that for you.

Well… I’m working with a raycast and some how i need the character for the blacklist

Remove the Player here. When you fire the remoteevent from a client it already gives you the player.

1 Like

OOHHH thanks youuuu that’s was the problem!