Attempt to call a instance value

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)

You’re calling the RemoteData instance, which can only be done on functions, did you mean to use [] instead of () here?

1 Like

Yes that was the solution it worked!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.