I was following through a scripting tutorial when I suddenly got an error, I’ve been looking back at the tutorial for a long time but I can’t seem to figure it out.
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
local debounce = RemoteData(player.Name).Debounce
if not debounce.Value then
debounce.Value = true
player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 1 * (player.leaderstats.Rebirths.Value + 1)
wait(cooldown)
debounce.Value = false
end
end)