Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

? I KEEP GETTING THIS ERROR: attempt to call a Instance value (here my localscript)

--(here my localscript)

local replicatedStorage = game:GetService("ReplicatedStorage") local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")

local cooldown = 300

replicatedStorage.Remote.snaps.OnServerEvent:Connect(function(player)

print("working")

if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end

******** local debounce = remoteData(player.Name).Debounce -- it happen here

if not debounce.Value then
	
	debounce.Value = true
	
	player.Leaderstats.Followers.Value = player.Leaderstats.Followers.Value + 5 * (player.Leaderstats.Rebirths.Value + 1)
	
	wait(cooldown)
	
	debounce.Value = false
	
end

end)

1 answer

change (player.Name) to [player.Name]

local debounce = remoteData[player.Name].Debounce -- it happen here

This discussion is preserved as it was. New answers, comments, and votes are closed.