FireClient: player argument must be a Player object

I am completely stuck with this because I have player from local Player = hit.Parent but the game wont accept that its a player object on

local Event = game.ReplicatedStorage.GiveKamuiFog
Event:FireClient(Player)
1 Like

do something like

if player ~= nil then

Edit: man below me is on to something

1 Like

What is hit? If hit is a part inside a character, hit.parent will be a character and not a player. In order to find the player, use game.Players:GetPlayerFromCharacter(character)

1 Like

It was a part in the workspace but thank you I figured out what to do from that line