How to Program a Roblox Clock

  Рет қаралды 9,377

sleitnick

sleitnick

Күн бұрын

Пікірлер: 43
@extracub1974
@extracub1974 2 жыл бұрын
I didn’t know you could use the command bar outside of the running game. That’s really cool.
@CSDETEK665
@CSDETEK665 Жыл бұрын
You really helped me at the hour point, I'm making a UI analog clock
@littensy
@littensy 2 жыл бұрын
At 25:11, isn’t adding second / 60 / 60 to hour unnecessary? Since minute adds second / 60 for precision, dividing minute by 60 should already have second / 60 / 60 there. If the video addresses this, I’ll edit this comment since I just saw it.
@sleitnick1
@sleitnick1 2 жыл бұрын
You're correct, I missed that! Adding the second/60/60 should not be done there.
@minerssp4363
@minerssp4363 2 жыл бұрын
can you make a working mirror that has reflection effect in studio
@ygivoreal
@ygivoreal 2 жыл бұрын
That’s not as easy as it sounds
@killrt99wwefearless37
@killrt99wwefearless37 2 жыл бұрын
Hello, can you make a video on how to rig a cars blinkers, break lights and headlights?
@realflopper
@realflopper 2 жыл бұрын
I have a problem with the attachments, So like i cant rotate them properly and my clock's hands just are weird
@luxix4161
@luxix4161 2 жыл бұрын
Hello! I have a question, but it's not about this video. I am trying to use table.sort from the client, and I need to use a function from a Service. When I call the function in the server from the client, the thread will yield in table.sort because of the :InvokeServer happening in the background. Is there any other way, I can call a function in a server, without it is going to yield? I would really appreciate some help.
@mystxryfr
@mystxryfr 2 жыл бұрын
You cud use promises which avoids this type of hassle. From my knowledge, u cud use promise.promisify() to wrap ur remote function call and attach a callback (:andThen) to receive the data once it's done.
@luxix4161
@luxix4161 2 жыл бұрын
@@mystxryfr Thanks for the answer, though I'm not really working on that project anymore. I tried to use promises, but I probably used them wrong, as when I tried printing the data, it would just print some internal promises stuff.
@mystxryfr
@mystxryfr 2 жыл бұрын
@@luxix4161 If u need help u can ask me abt it or better yet there is a discord server that u can join where they help with issues regarding promises
@mystxryfr
@mystxryfr 2 жыл бұрын
Lmk if u want the server invite
@luxix4161
@luxix4161 2 жыл бұрын
@@mystxryfr Sure. I think my next development phase is learning stuff like promises, maids and so on.
@CatChase957
@CatChase957 2 жыл бұрын
18:53 Whats the problem with tick()? Like why is it gonna be deprecated?
@PablitoTheChicken
@PablitoTheChicken 2 жыл бұрын
Only reason i can think off is that once it reaches the 32bit integer limit (2147483647), it will no longer work. So maybe they want to avoid that being a problem for games in the future
@xSwezan
@xSwezan 2 жыл бұрын
@@PablitoTheChicken If that were to be the case I don't think they would deprecate it since I don't think roblox will be around for another 15 years. But I don't know, its still the most reasonable reason for it to be deprecated.
@deldrise9169
@deldrise9169 2 жыл бұрын
@@xSwezan Roblox will certainly be here for another 15 years
@tootaashraf1
@tootaashraf1 2 жыл бұрын
@@deldrise9169 no they wont
@deldrise9169
@deldrise9169 2 жыл бұрын
@@tootaashraf1 dumb
@Mrmiauplay
@Mrmiauplay 2 жыл бұрын
For some reason I dont see attachments (I see them but not through textures) and command dont work
@DreZaM
@DreZaM 2 жыл бұрын
damn, man, thank you so much!
@myAnxiousWorld
@myAnxiousWorld 2 жыл бұрын
This is cool
@kylemarasco9282
@kylemarasco9282 2 жыл бұрын
You should update Real Plane Physics Test, idc what it is just do little updates every once in a while it would mean a lot to me :)
@drxduca
@drxduca 2 жыл бұрын
G' day mate, Can you please Make a new version of the Planekit you built back in 2011? Would be a really nice tutorial for pepole like me who want to build planes but can't because there's not enough well.. Tutorials for them. And those tutorials that exist either use the old planekit (which at this point roblox ruined) or show you how to build the MODEL of a plane, not the coding and stuff. I've tried everything, using the First version, second version, searching youtube for tutorials but failed in doing so. Thanks and best wishes!
@ZMW7
@ZMW7 2 жыл бұрын
Neat video
@Tkdriverx
@Tkdriverx 2 жыл бұрын
For the CFraming section, couldn't you just move your pivot to match up (x, z) with the center, and just PivotTo from there with the Angles? (I'm sure it has some of its own problems)
@xSwezan
@xSwezan 2 жыл бұрын
How do you comment out lines fast? I've always wondered this when watching your videos and I cant seem to find a shortcut for it. So I guess its a plugin.
@sleitnick1
@sleitnick1 2 жыл бұрын
Same as most IDEs: CTRL + /
@xSwezan
@xSwezan 2 жыл бұрын
@@sleitnick1 Thank you! I tried that a while ago but it didn't work, and it was because I have my keyboard language set to swedish and the / button doesn't exist on it. But it worked when I used the / button on the numpad. It also works when I do CTRL + SHIFT + 7
@aarontole7218
@aarontole7218 2 жыл бұрын
Man you guys much have huge hands.. lol
@Korum211
@Korum211 2 жыл бұрын
Thanks, can't wait to use this!
@iggydeveloper
@iggydeveloper 2 жыл бұрын
The ClockController has three functions for second, minute, and hour. Couldn't that be shortened to one function; SetTime(timeUnit: string, timeValue: number)? Something similar to this: -- Valid timeUnit paramaters: hour, minute, second. function ClockController.SetTime(timeUnit: string, timeValue: number) local timeObject = clock:FindFirstChild(timeUnit) assert(timeObject, "[ClockController]: Timeunit " .. (timeUnit or "unknown") .. "specified isn't a valid unit.") local ratio = timeValue / (timeUnit == "hour" and 12 or 60) local rotation = ratio * 360 timeObject.HingeConstraint.TargetAngle = rotation end Although I could imagine using a seperate function for each unit being more clear.
@J4M3S247
@J4M3S247 2 жыл бұрын
I think keeping the controller methods separate is cleaner from a design principle PoV. That way each method has a single responsibility which is to just move the respective hand to the given position. In comparison, combining all of this into one method you introduce these somewhat hidden rules. You have this timeUnit parameter that you'd need to search into the code to figure out what it is meant to be, instead of having that information in the function name itself. So yeah you're right that it could but often the better question is whether you should
@TheSkyGamez
@TheSkyGamez 2 жыл бұрын
I would do this: function ClockController.SetTime(hours: number?, minutes: number?, seconds: number?) (number? means a number or nil) so this way you can change multiple hands at the same time or just one Although I don't know when you would ever change only one hand...
@turing6976
@turing6976 2 жыл бұрын
18:53 os.clock() is preferred over tick() and achieves a similar purpose
@biack1st
@biack1st 2 жыл бұрын
Correct me if I’m wrong, but tick is for getting the Unix Epoch time. While os.clock returns the CPU time used by lua in seconds
@bondo532
@bondo532 2 жыл бұрын
okay all of you three are wrong
@turing6976
@turing6976 2 жыл бұрын
I'm not saying they are the same. My point is that their most common use case (e.g. local startTime = tick() local endTime = tick() - startTime) can be done with both.
@extracub1974
@extracub1974 2 жыл бұрын
os.clock was always annoying to use for me, although I wasn’t as experienced as I am now.
@susiebaka3388
@susiebaka3388 2 жыл бұрын
Now use it as a scheduler to run scripts lol
@kendrick9878
@kendrick9878 2 жыл бұрын
𝕡𝕣𝕠𝕞𝕠𝕤𝕞 😝
@S41NTcodes
@S41NTcodes 2 жыл бұрын
1st
Observer Pattern
16:08
sleitnick
Рет қаралды 7 М.
Paying $10 vs $100 For a Roblox Game..
15:00
TheDevKing
Рет қаралды 937 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Transforming a 90's Hot Wheels PC into a Modern Gaming Beast
22:04
Shank Mods
Рет қаралды 7 МЛН
Dev Journal: Moving UI & Avoid WaitForChild Nightmare
10:46
sleitnick
Рет қаралды 11 М.
23 Minecraft Hacks That Don't Require Mods
8:44
Skip the Tutorial
Рет қаралды 9 МЛН
I Became a Roblox Developer for a Day
8:27
PolyMars++
Рет қаралды 812 М.
Jailbreak Is a Community of Friendly Players
8:01
Infortality Roblox
Рет қаралды 1,5 МЛН
KreekCraft reacts to my INSANE WORLD RECORD SPEEDRUN DOORS ROBLOX
7:23
Roblox Studio Non-Euclidean Illusion Tutorial (2 project files)
10:12
Compress / Optimize Datastore  - Roblox Scripting Tutorial
47:30
Suphi Kaner
Рет қаралды 18 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.