RemoteEvent not working

So basically I have a warn remote which replicates a GUI from replicated storage onto the selected players playergui. Now this was working before I added the whole +1 value thing. Basically I want it to add a +1 to the intvalue in the players folder. But its not working.

code:

        WarnEvent.OnServerEvent:Connect(function(player, WarnPlayer)

        	local PlayerWarn = game.Players:FindFirstChild(WarnPlayer)
        	if admins[player.Name] and PlayerWarn then
        		local noti = game:GetService("ReplicatedStorage").Notification:Clone()
        		noti.Parent = PlayerWarn.PlayerGui
        		PlayerWarn.Stats.Warnings.Value = PlayerWarn.Stats.Warnings.Value + 1
        		wait(6)
        		noti:Destroy()
        		
        		
        	end
        end)

Any errors? Sorry for being kinda late, I’m messing with random stuff.

Change this to

PlayerWarn.Stats.Warnings.Value += 1
1 Like

I recommend using a LocalScript in PlayerScripts, handle a OnClientEvent, and have it FireClient. Much more effecient.

1 Like

I didn’t see anywhere where he had said the location of the LocalScript in the explorer/hierarchy.

No errors were produced. I found the solution tho