if game.Workspace:FindFirstChild("Gem") then
game.Workspace.Gem.ClickDetector.MouseClick:connect(function()
local Player = game:GetService("Players").LocalPlayer
local Life = game.Player.leaderstats.Life
Life.Value = Life.Value + 10
end)
end
Any help would be appreciated.

1 comment
Don't really put the function inside a condition check because It will always be connected and It can't be disconnected unless you disconnect the RBXSignal from outside the conditional check