Syntax Error: Expected identifier when parsing expression, got '0'

I wanted to make a pin, somehow this error popped out
Screenshot (284) (1)

Here’s my code:

local function resetPin(plr)
	plr.Pin.Value == 0
end
game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(message)
		message = string.lower(message)
		local command = message[1]
		local target = message[2]
		
		resetPin(target)
	end)
end)

Anyone know how to fix the problem?

I mean like reset pin system, resetting player’s pin back to 0

remove one of the equal signs from this. Also, plr would definitely be nil from this function because target is a string, not a player instance.

1 Like

Oh yeah didn’t realize that, thanks.