Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Why is this script not changing my clickSpeed?

Asked by
stupru 6
5 months ago

Hi, I've been working on a script to change click speed depending on how much money you have, but it hasn't been working.

local gui = script.Parent
local frame = script.Parent.Frame
local mainButton = frame.mainButton
local Player = game:GetService("Players").LocalPlayer
local canOof = true
local doubleSpeed = 7955426
local mpService = game:GetService("MarketplaceService")
local oofs = game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Oofs")
local clickSpeed = script.Parent.clickSpeed
local rangeOne = NumberRange.new(100,299)
local rangeTwo = NumberRange.new(300,599)


local function Setup(player)
    print("This script exists!")
    if oofs <= 99 then
        clickSpeed.Value = 1
        print(clickSpeed)
    elseif oofs >= rangeOne.Min and oofs <= rangeOne.Max then
        clickSpeed.Value = 0.9
        print(clickSpeed)
    elseif oofs >= rangeTwo.Min and oofs <=rangeTwo.Max then
        clickSpeed.Value = 0.8
        print(clickSpeed)
    end
end

local playersInGame = game.Players:GetPlayers()
for i = 1, #playersInGame do
    Setup(playersInGame[i])
end





Thanks.

0
i think it doesn't register when oofs changes its value so i think you will need to update what the value of oofs every time it changes HappyTimIsHim 601 — 5mo
0
i think it doesn't register when oofs changes its value so i think you will need to update what the value of oofs every time it changes HappyTimIsHim 601 — 5mo

Answer this question