I am making a simulator game but everytime I click my screen to get reward I get attempt to call a userdata value. what do I do ? the script goes in ServerScriptService.

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

local cooldown = 1


replicatedstorage.Remote.lift.OnServerEvent:Connect(function(player)
	
	if not RemoteData:FindFirstChild(player.Name) then return "NoFolder" end
	print(player.name)
	local debounce = RemoteData(player.Name).Debounce
	 
	if not debounce then 
		 
		debounce.Value = true
		
		player.leaderstats.strenght.value = player.leaderstats.strenght.Value + 25 * (player.leadrstats.Rebirth.Value + 1)
	
		wait(cooldown)
		
		debounce.Value = false
	end	
end)

1 comment

0

There are several capitalization issues, also, line please?