local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
local cooldown = 1
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
if not remoteData:FirstChild(player.name) then return "NoFolder" end
local debounce = remoteData[player.name].Debounce
if not debounce then
debounce.Value = true
player.Leaderstats.Strenght.Value = player.Leaderstats.Strenght.Value + 25 * (player.Leaderstats.Rebirths.Value + 1)
wait(cooldown)
debounce.Value = Faces
end
end)
COMMUNITY QUESTION
why is the script not adding strength to the leaderboard?
2 answers
local module = {}
local replicatedStorage = game:GetService("ReplicatedStorage")
function module .Lift()
replicatedStorage.Remotes.Lift:FireServer()
end
return module
So, here is the fix,
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
local cooldown = 1
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
if not remoteData:FindFirstChild(player.name) then return "NoFolder" end --There is no function named 'FirstChild' I assume you mean 'FindFirstChild'
local debounce = remoteData[player.name].Debounce
if not debounce then
debounce.Value = true
player.Leaderstats.Strenght.Value = player.Leaderstats.Strenght.Value + 25 * (player.Leaderstats.Rebirths.Value + 1)
wait(cooldown)
debounce.Value = Faces
end
end)
If your code is still not working, Post a comment.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Is strength supposed to be spelled that way for you or did you spell it wrong and is there any errors
that is the roing skript
Any errors on console?