I'm gettting this error: "09:56:24.608 ServerScriptService.Remotes:13: attempt to call a Instance value - Server - Remotes:13"
I don't know how to fix this one (I am new so I have to learn a lot)
Code:
local replicatedStorage = game:GetService("ReplicatedStorage") local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
local cooldown = 1
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
print("Fired")
if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
local debounce = remoteData(player.Name).Debounce - - The Error Is in this line
print("Got past the Debounce variable")
if not debounce.Value then
debounce.Value = true
player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 25 * (player.leaderstats.Rebirths.Value + 1)
wait(cooldown)
debounce.Value = false
end
end)

6 comments
Yes, Thank you! But what is the difference between (player.Name) and [player.Name]?
You call a function using parentheses, and function arguments go inside the parentheses. You get a value in a table using brackets, with the table key (where the value is stored in the table) going inside the brackets. Calling a function using someFunction[] would cause an error, and getting a value from a table using someTable(key) would cause an error
which is basically what you did since Roblox represents objects as tables
Ah ok, thank you.
I just started scripting, so I am trying to learn it all, but it is reamly hard xD.
glad to help :)