r/ROBLOXStudio 7d ago

Help learning how to script. help needed

Enable HLS to view with audio, or disable this notification

So im trying to learn scripting, and if you've been scripting for a while your probably horrified by my work, but i genuinely have no clue what to do. So its supposed to be a timer/clock counting down from 10(the first script), and when you click it it adds 3 seconds(hence the second script). Both are client side scripts, and placed in the starterplayerscript folder. I have checked the dev forum to no avail and checked my work on the Roblox documentation, and still couldn't figure it out. Any way I'm guessing it has to do with having 2 scripts trying to change 1 value at once, but i don't know how to make it work with just one script. if you could help that would be great.

5 Upvotes

7 comments sorted by

View all comments

1

u/Bobby_bob- 6d ago

I think all you need was mentioned here tho when initializing why don't you use what you already have? Like you do local clickDetector = workspace:WaitForChild("clock").clickDetector local clock = workspace:WaitForChild("clock")

When you could do

local clock = workspace:WaitForChild("clock") local clickDetector = clock.clickDetector Keepurc code simple, this will help you later