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

How to fix "ServerScriptService.Remotes:13: attempt to call a userdata value" ?

Im trying to make a debounce but it shows the error in the title. Whats the problem

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
	



if not remoteData(player.Name).debounce then 
	
	remoteData(player.Name).debounce.Value = true
	
	player.leaderstats.Strength.Value = player.leaderstats.StrengthValue + 25 * (player.leaderstats.Ranks.Value + 1)
	
	wait(cooldown)
	
	remoteData(player.Name).debounce.Value = false
	
	
end

end)

2 comments

0

I think it’s because you didn’t put a . between strength and value when you are trying to add

0

False, he forgot .Value after debounce on line 06.

1 answer

There.

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




if remoteData(player.Name).debounce.Value = false then 

    remoteData(player.Name).debounce.Value = true

    	player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 25 * player.leaderstats.Ranks.Value + 1			 

    wait(cooldown)

    remoteData(player.Name).debounce.Value = false


end

Happy to help, if you have any other questions feel free to add me on Discord: Haunted#5196

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