Player argument must be a Player Object Annoying error

Why doens’t this work? I’m literally defining a player,

If char => script.Parent then player should be script.Parent.parent

Script: Inside of the Player, (workspace.PlayerName.Script)

image

local char = script.Parent
local plr = script.Parent.Parent
local hum = char.Humanoid

while wait() do
	if hum.Sit == true then
		script.RemoteEvent:FireClient(plr, "dis")
	else
		script.RemoteEvent:FireClient(plr, "ena")
	end
end
local Players = game:GetService("Players")
local plr = Players:GetPlayerFromCharacter(char)

The character isn’t the Player.

2 Likes