stats

local serverStorage = game:GetService("ServerStorage")
	game.Players.PlayerAdded:Connect(function(plyer)
	 
	    local Leaderstats = Instance.new("Folder")
	    Leaderstats.Name = "leaderstats"
	    Leaderstats.Parent = plyer
	 
	    local Strength = Instance.new("NumberValue")
	    Strength.Name = "Strength"
	    Strength.Parent = Leaderstats
 
	 
	local dataFolder = Instance.new("Folder")
	dataFolder.Name = plyer.Name
	dataFolder.Parent = game.ServerStorage.RemoteData
	 
	 
	local debounce = Instance.new("BoolValue")
	debounce.Name = "Debounce"
	debounce.Parent = dataFolder	
	
	end)

LocalScript

local module = require(script.Parent:WaitForChild("ModuleScript"))
local players = game.Players.LocalPlayer
local mouse = players:GetMouse()


script.Parent.Activated:Connect(function()
	module.Lift()
	
	
end)

ModuleScript

local module = {}
	 
	local replicatedStorage = game:GetService("ReplicatedStorage")
	 
	function module .Lift()
	 
	    replicatedStorage.Remotes:WaitForChild('Lift'):FireServer() -- Waits for 'Lift' to be replicated to client
	 
	end
	 
	return module

Remote

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 then
		debounce.Value = true
		
		player.Leaderstats.Strenght.Value = player.Leaderstats.Strenght.Value + 25 * (player.Leaderstats.Rebirths.Value + 1)
		
		wait(cooldown)
		
		debounce.Value = false

	end 
	
	
end)

3 comments

0

In the script you labeled as 'remote'

0

Whoops. I pressed enter too soon. Anyways, in the script you labeled as 'remote', on line 16, you miss spelled strength as 'Strenght', which doesn't exist because your leaderstat is called 'Strength'. Also, you need to post more explanation about what exactly isn't working. If there are other errors other than the one I mentioned, you should list them so that we can answer you questions.

0

first of all talk normally in english bro