Server dosen't see my point (from Gui local script)

You can write your topic however you want, but you need to answer these questions:

  1. I don’t know how to make the server see the points from a local script.
local Part = script.Parent
local Plr = game.Players.LocalPlayer
local money = Plr.leaderstats.Money
Part.MouseButton1Click:Connect(function()
Plr.leaderstats.Poind.money += 1 

end)

I Use Youtobe and whatching more video but it dosen’t work.

1 Like

You need to use RemoteEvents. If you need any assistance in implementing it, feel free to ask.

1 Like

I just don’t know where from call event

1 Like

I’ll just tell you the steps on how to do it.

  1. Add a RemoteEvent in ReplicatedStorage named “Click”
    image

  2. Change your LocalScript to this:

--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--//Variables
local Click = ReplicatedStorage:WaitForChild("Click")
local Part = script.Parent

--//Functions
Part.MouseButton1Click:Connect(function()
	Click:FireServer()
end)
  1. Add a script in ServerScriptService and paste this inside:
--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--//Variables
local Click = ReplicatedStorage:WaitForChild("Click")

--//Functions
Click.OnServerEvent:Connect(function(player)
	player.leaderstats.Points.Value += 1
end)

Not sure if Poind was a typo, but change it back if needed.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.