I am making a simulator game that gives strength everytime you click the screen with the tool in your hand
I am confused on how to make the gamepass that doubles the strength you gain from the tool
Notes - The remote is "Swing" and the leaderstats value is "Strength" and the tool that fires the remote is "Knife"
Scripts
Script that gives strength -
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
local cooldown = 0.5
replicatedStorage.Remotes.Swing.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
print("got past the debounce if statement")
debounce.Value = true
player.leaderstats.Strength.Value = player.leaderstats.Strength.Value +15
wait(cooldown)
debounce.Value = false
end
end)

3 comments
thanks but trust me, i scrolled everywhere to try and find it but for some reason i couldnt find the right one i needed
Umm, where do I put this? Everytime I put it in the remotes script it just doubles my strength everytime I click, going from 15 past 100.
nevermind