Values are not added to other players and only me

So the script adds the value to my leaderstats even if i type other people users
local script

Clicks_Giver.Execute.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.Cmds.cg:FireServer( Clicks_Giver.Player.Text , Clicks_Giver.ClicksAmount.Text)	
end)

game.ReplicatedStorage.Cmds.cg.OnServerEvent:Connect(function(Player, E, amount)
	game.Players:FindFirstChild(Player.Name).leaderstats.Clicks.Value += tonumber(amount)
end)

Script ^^^

for the script it should be this :

game.ReplicatedStorage.Cmds.cg.OnServerEvent:Connect(function(Player, E, amount)
	game.Players:FindFirstChild(E.Name).leaderstats.Clicks.Value += tonumber(amount)
end)

Argument 1 missin or nil… i get dat error

let me see what i did wrong ill send u the script when im done

it should be this :

game.ReplicatedStorage.Cmds.cg.OnServerEvent:Connect(function(Player, E, amount)
	game.Players:FindFirstChild(E).leaderstats.Clicks.Value += tonumber(amount)
end)
1 Like

YES!!! =Thank you so much dude!
Also whats ur discord

also u should also prob add a hacker check cuz i think they can fire it and my discord is
Lego#3691

1 Like