Hello developers, i trying to make a event what gives a clicks to player, but there is problem i got a instance from player.Name why? I Calling from LocalScript.
Event Script:
local replic = game:GetService("ReplicatedStorage").Events
replic.Click.OnServerEvent:Connect(function(player)
-- ok
-- debug
-- no debug
game:GetService("Players")[player].leaderstat.Points.Value += game:GetService("Players")[player].Values.toGive.Value * 2
end)
Calling script:
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
game:GetService("ReplicatedStorage").Events.Click:FireServer(player.Name)
return --print(player.Name)
end)
BTW did you see my post because the first parameter is the player anyways so no need to pass the player name just used to automatically passed player parameter