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)
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.