Hello, I Really Need Help In This And I'm A Beginner Is Coding So Could You Please Help Me With This Script??
local tool = script.Parent local player = script.Parent.Parent.Parent tool.Activated:Connect(function() player.leaderstats.Technology.Value = player.leaderstats.Technology.Value + 1 end)
There is something called debounce.
local tool = script.Parent local player = script.Parent.Parent.Parent local debounce = false tool.Activated:Connect(function() if debounce then debounce = true player.leaderstats.Technology.Value = player.leaderstats.Technology.Value + 1 end wait(2.5) debounce = false end)
My Leaderstats is
function createLeaderstats(plr) local leaderstats = Instance.new("StringValue") leaderstats.Name = "leaderstats" leaderstats.Parent = plr local technology = Instance.new("IntValue") technology.Parent = leaderstats technology.Name = "Technology" technology.Value = 0 local coins = Instance.new("IntValue") coins.Parent = leaderstats coins.Name = "Coins" coins.Value = 0 local gems = Instance.new("IntValue") gems.Parent = leaderstats gems.Name = "Gems" gems.Value = 0 end game.Players.PlayerAdded:Connect(function(plr) createLeaderstats(plr) end)
Closed as Not Constructive by User#6546
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?