#AutoClicker
1 messages · Page 1 of 1 (latest)
while true do
isSecond = not isSecond
for _, player in Players:GetPlayers() do
local profile = PlayerData.Profiles[player]
if not profile then continue end
local isRegularActive = profile.Data.Auto.Regular.Active
local regularDuration = profile.Data.Auto.Regular.Duration
local isFastActive = profile.Data.Auto.Fast.Active
local fastDuration = profile.Data.Auto.Fast.Duration
if isFastActive then
PlayerData.AdjustClicks(player, 1)
if isSecond then
profile.Data.Auto.Fast.Duration -=1
end
if profile.Data.Auto.Fast.Duration <= 0 then
profile.Data.Auto.Fast.Active = false
Remotes.UpdateAutoClicker:FireClient(player, "Fast", false)
end
end
if isSecond and isRegularActive then
PlayerData.AdjustClicks(player, 1)
profile.Data.Auto.Regular.Duration -=1
if profile.Data.Auto.Regular.Duration <= 0 then
profile.Data.Auto.Regular.Active = false
Remotes.UpdateAutoClicker:FireClient(player, "Regular", false)
end
end
task.wait(.5)
end
end
why is it in a while true loop 😭
is this the whole script?
cuz like 4 variables are not assigned
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local Players = game:GetService("Players")
local Remotes = ReplicatedStorage.Remotes
local PlayerData = require(ServerScriptService.PlayerData.Manager)
local function UpdateAutoClicker(player: Player, buttonType: "Fast" | "Regular")
local profile = PlayerData.Profiles[player]
if not profile then return end
local isActive = profile.Data.Auto[buttonType].Active
local duration = profile.Data.Auto[buttonType].Duration
if isActive then
profile.Data.Auto[buttonType].Active = false
Remotes.UpdateAutoClicker:FireClient(player, buttonType, false)
elseif not isActive and duration > 0 then
profile.Data.Auto[buttonType].Active = true
Remotes.UpdateAutoClicker:FireClient(player, buttonType, true)
end
end
Remotes.UpdateAutoClicker.OnServerEvent:Connect(UpdateAutoClicker)
local isSecond = false
this goes before it.
what should i use😭😭
i very knew to this and i follow guides word for word but i alwasy make mistake pls help 🙁
yeah you probably shouldn't use ProfileService
or ProfileStore wtv you use
you should not follow tutorials that use such advanced stuff wehn ur a beginner
...
** You are now Level 3! **
You are just not gonna learn how to code things yourself like this, we could figure out why it won't work but after that something else will also not work and ts will just repeat over and over again
i already spent like days in this project. im not going to stop now.
I cant.
🤷♂️
i got it work!, silly mistakes as always
nice
chatgpt for the save 🙂
yeah maybe dont rely on it too much
you don't learn anything if u just get spoonfed code
@lilac imp Firstly don't listen to him, try and fail a million times, that's how you learn. As for your code if it's working now great!
Thanks for the motivation 😁
you learn wehn you fix these fails urself and not let chatgpt fix them
Chatgpt is an amazing tutor, if you're new and have no idea where to start and it's simple code asking chatgpt to fix it is a valuable way to learn how to recognize what's wrong with code
Dismissing it entirely is an amazing way to end up in the past.
Just get used to it man, AI is such a used tool now, and a very helpful one if used correctly. Be more efficient.
I didn't say AI is bad i said its bad how he uses it 😭
Not really, it found the error.
Probably was a typo or something since it was "A sily mistake"
i would bet that he doesn't know what is going on 90% of his code
Tbf its not his code, its a youtube tutorial and I do agree on this, he more than likely doesn't know.
Tutorials are the worst way to learn.
Docs & Scripting stuff your self is the best way.
and ai
Yes thats also the reason why AI in this scenario isn't useful, because even if it explains what is wrong he will not understand cause it's too complex for beginners


lets not say 90%
I have some clue
more like ik 60% of the code. im learning as i watch the tutorial.
i mean code nowadays is pretty much english.
its just idk i woudnt know how to start myself but i could explain a piece of code
if were quite simple.
local framework = require(script.framework)
framework.init()
what abt this
so i havent used it before but
u created a local variable called framework
the "require" part idk
but from my previous coding the "script.framework" you are going inside a function or smth, idk how to explain it.
ex u have "profile.Data.Auto.Fast.Active = false "
here you have profile which has the Data..
and the last part ur just running it i think but idk what init is
What he did was similar but for module scripts
wdym?
see i have no clue what a framework actually is..
i have never used it.
yeah no ts would compare to an F in grades 😭
😭 😭
framework is a variable to which we assign the value require(script.framework)
require is for module scripts from which we get the returned value (returns something like a function for example)
script.framework is the path for the module, in this example its under the script and named framework
frame.init() calls the function iside the returned value of the framework
thats what i meant by "you are going inside a function or smth, idk how to explain it."
i think i got 3/4
🥴
A framework in real world terms is pointless on Roblox as studio is a game engine
In roblox terms, is a collection of code the runs the game on module scripts
That*
no im refering to an object 😭
i guess you could put it like that
** You are now Level 28! **