What are Local Scripts? Roblox Scripting Explained

Confused about local scripts? Look no further! This 9 minute primer explains what you need to know along with a few examples to get you up to speed.
DISCORD ► / discord
TWITTER ►@gnomecodeRBLX

Пікірлер: 140

  • @GnomeCode
    @GnomeCode2 жыл бұрын

    Tomorrow: Module Scripts

  • @PineBloxx

    @PineBloxx

    2 жыл бұрын

    👍👍

  • @dunderdyle

    @dunderdyle

    2 жыл бұрын

    Can you be my friend :)

  • @oSpam

    @oSpam

    2 жыл бұрын

    Yess

  • @Ynoob87

    @Ynoob87

    2 жыл бұрын

    Nice

  • @bloxer_7696

    @bloxer_7696

    2 жыл бұрын

    @@dunderdyle join his discrord I’ve talked to him alot I sent him a emoji suggestion once

  • @PineBloxx
    @PineBloxx2 жыл бұрын

    Thanks Gnome! This really boosted my knowledge with local scripts! Excited for the module scripts!

  • @peppyweppy6851
    @peppyweppy68512 жыл бұрын

    Thank you so much Gnome! I was really confused about what localscripts did before, but this video makes it so clear!

  • @mrminion545
    @mrminion545 Жыл бұрын

    This was actually really useful, and I can see a lot of ways I could use this!

  • @Enes_emre01
    @Enes_emre018 ай бұрын

    Video summed up: -Local script are mostly used for gui -local scripts can only be used in some folders/services -a local script only fires an event to a device, meaning if I were to click on a button, only my game(my device) would be changed, everyone else wouldn't be affected

  • @Shadow-tu7yb

    @Shadow-tu7yb

    7 ай бұрын

    So basically local scripts are just for the player while global scripts are for everything

  • @GlowDragon781

    @GlowDragon781

    7 ай бұрын

    yeah@@Shadow-tu7yb

  • @jpeg3083

    @jpeg3083

    5 ай бұрын

    @@Shadow-tu7yb Also, LocalScripts are actually Client-Sided scripts, that means that their actions are also instantaneous and don't depend on your ping/ms.

  • @noreally2120
    @noreally21203 ай бұрын

    I did it exactly as he did in the video and keep getting: Entrance is not a valid member of workspace “Workspace”

  • @leo_dev8111
    @leo_dev81118 ай бұрын

    Thank you for helping me understand local scripts. Sometimes when I watch KZread tutorials, I am just confused why they use local scripts instead of basic scripts.

  • @mauigg8282
    @mauigg82822 жыл бұрын

    Soo helpful thank you so much, keep up the great videos :D!!!

  • @SeiboRoblox
    @SeiboRoblox Жыл бұрын

    OMG HELPED ME ALOT, I DIDNT KNOW THE DIFFERENCE BEFORE

  • @thewriterOfCom
    @thewriterOfCom6 ай бұрын

    You just made me learn 10x more about local scripts.

  • @yaroslavtkl5513
    @yaroslavtkl55134 ай бұрын

    you're amazing in explaining stuff

  • @Absycal
    @Absycal11 ай бұрын

    Thank you so much, you gained a subscriber!

  • @dynamiclyte2633
    @dynamiclyte26339 ай бұрын

    Very well explained thanks

  • @ragdoll1923
    @ragdoll1923 Жыл бұрын

    thanks allot. im learning roblox studio and you explained this so well

  • @eltiziocatoagagag3215
    @eltiziocatoagagag32152 жыл бұрын

    I was trying to find a tutorial for another thing but i couldn't find it, so I tried searching actually how scripts works and thanks, now i have understanded how this works

  • @EllisPierce015
    @EllisPierce0158 ай бұрын

    1 year later still a awesome video

  • @that1gamerlad98
    @that1gamerlad982 жыл бұрын

    Very Cool! I might actually have learned something from this.

  • @TommyBoyXD
    @TommyBoyXD11 ай бұрын

    Amazing vid!

  • @aoxmi
    @aoxmi7 ай бұрын

    ty it was so easy to understand

  • @just_a_zombie6718
    @just_a_zombie67189 ай бұрын

    the heck that so useful!

  • @A.F.A_REDACTED
    @A.F.A_REDACTED9 ай бұрын

    Why you have Only 80k subs? You help so much

  • @iamdirtman3815
    @iamdirtman3815 Жыл бұрын

    Wow thanks man you make things so clear you should have much more subscribers

  • @GnomeCode

    @GnomeCode

    Жыл бұрын

    Glad I could help!

  • @mrblackblack2802

    @mrblackblack2802

    11 ай бұрын

    @@GnomeCode Why learn to script when you can use Stolen Roblox games

  • @NoobStudios414

    @NoobStudios414

    7 ай бұрын

    @@mrblackblack2802because it’s fun and no one plays stolen games other then ogaboaga

  • @fmnzo
    @fmnzo Жыл бұрын

    thank you for this it really helped me

  • @Mufazl2120
    @Mufazl212010 ай бұрын

    Love your vids!🎉

  • @itssam752
    @itssam7529 ай бұрын

    everyone can relate to the changing robux through inspect element 😅

  • @kingofgameing107
    @kingofgameing107 Жыл бұрын

    thanks this video was really helpful

  • @retrostudiogameplay2581
    @retrostudiogameplay25812 жыл бұрын

    Hi, when will you be resuming the Mafia City series? Thanks!

  • @RZzOo
    @RZzOo Жыл бұрын

    Thanks for that bro

  • @BIuStarProductions
    @BIuStarProductionsАй бұрын

    Tysm! New sub goes to you!

  • @MagAgent006-qj5nm
    @MagAgent006-qj5nm6 ай бұрын

    OMG THANK YOU SO MUCH THIS IS WHAT I WANT FOR MY GAME!!!!!!!! BRO IF U DIDNT UPLOAD THIS I WILL CANT MAKE GAME FOREVER

  • @waka9115
    @waka9115 Жыл бұрын

    Thanks man!!!

  • @xsticcyds5459
    @xsticcyds54592 жыл бұрын

    Even though I know everything he says I still like to watch it.

  • @jellybeann69420

    @jellybeann69420

    2 жыл бұрын

    Same. Its entertaining.

  • @Mazen-og9bh
    @Mazen-og9bh Жыл бұрын

    omg thank you so much

  • @playerje4722
    @playerje47222 жыл бұрын

    Thanx, I finaly understood the diference

  • @neekthegamer
    @neekthegamer2 жыл бұрын

    this guy deserves like 99999 subscribers, lol. his videos are so easy to understand, yet so complex.

  • @jellybeann69420

    @jellybeann69420

    2 жыл бұрын

    Nah, he deserves.. 999999999999999999999999 subs..

  • @albertoedgar831

    @albertoedgar831

    Жыл бұрын

    @@baconhairawesomeyeah7528 nah he deserves this: local gnomecodesDeservedSubs = math.huge() while true do gnomecodesDeservedSubs += gnomecodesDeservedSubs * math.huge() end

  • @hackpo1015

    @hackpo1015

    3 ай бұрын

    He’s pretty damn close to that goal

  • @duckgamer67
    @duckgamer67 Жыл бұрын

    thank you i could not have my code work for 4 days until now

  • @datboin4te
    @datboin4te2 жыл бұрын

    Ik it might be a lot but can you make a video talking about what words mean like humanoid or stuff like that and explain so stuff like that

  • @CHRF-55457
    @CHRF-55457 Жыл бұрын

    Is there a way to change a local script into a server cript? Going to the dev forums helped me fix one problem but couldn't help me fix the other 5, maybe six left. Things I've fixed: Arm welds showing up. Things to fix: Bayonet attack animation Bayonet equipping animation Shoot to kill players. Reloading animations Holster Idle animation (There might be some stuff i forgot to mention) Trying to fix a free model gun i found so it can be use for pvp. Every one of it's scripts were local scripts til i found it

  • @grannygamersoomets1632
    @grannygamersoomets1632 Жыл бұрын

    Hey bro thank you so much tho it really helped me out now i know how to make localscript door

  • @itzmartin20
    @itzmartin204 ай бұрын

    Your explain is indeed make clear my stupid brain, thanks a lot!

  • @GarethMcD-zq8ei
    @GarethMcD-zq8ei Жыл бұрын

    well this tells me so much, right so I know the local script only works in few places but what about said parts that are connected to the script, how do I tell the script that's where there part is that you need? More context I got this VPframe script that makes a "live camera feed", the problem is the way I want to use it I need one of the parts to not be in the workspace but I genuinely have no clue how to set it within the script that's where the part is, other words there is two parts, camera & screen I need the screen to be in a specific model/folder for it to give me the desired results but I can't find my answer anywhere (if there even is one), simply if there is an answer well, I just don't know what else to search ;-; I've been at this for like three days now & keep getting set back each time I think I've learnt something (sad truth I haven't)

  • @alco8225
    @alco8225 Жыл бұрын

    thank you very much

  • @awesomedude2400
    @awesomedude2400 Жыл бұрын

    Can u make a full advanced scrioting tutorial playlist

  • @hshdjdjsjjsjs6075
    @hshdjdjsjjsjs60757 ай бұрын

    so it doesnt work cause my device is too bad??? or just because i test it in studio and studio is maybe weaker idk

  • @WearWQLF
    @WearWQLF2 жыл бұрын

    finaly a video thanks gnome code im also number 1st in video yeah

  • @GnomeCode

    @GnomeCode

    2 жыл бұрын

    kzread.info/dash/bejne/gpqN0Nh9fJO3k9o.html

  • @7vik147
    @7vik147 Жыл бұрын

    thanks gramps

  • @Corgi670
    @Corgi670 Жыл бұрын

    wait so if i wanted to only have the color of a part change only for that person i would use a local script?

  • @lucidhydra2446
    @lucidhydra2446 Жыл бұрын

    this video was very helpful! thanks for teaching the logic behind scriptings!!!

  • @josephsqwad1-animation847
    @josephsqwad1-animation8478 ай бұрын

    funni hack that was so entertaining

  • @Xecutioner62
    @Xecutioner622 ай бұрын

    This works but the wall just fallows you!!! How to fix

  • @creeperplayzz
    @creeperplayzz21 күн бұрын

    Life saver, my local script wouldn't work cus its in a workspace part, now ik why

  • @ChristianFooWasTaken
    @ChristianFooWasTaken8 ай бұрын

    Yo do they save if you leave or something

  • @sevenstarrryy
    @sevenstarrryy Жыл бұрын

    Random fact about my laptop: my sister stepped on it one time and it created black spots/blind spots

  • @chasereos
    @chasereos11 ай бұрын

    someone please help, i’m doing the same thing it’s just with sounds and a tween, with touched events. it won’t work. please help fixed

  • @Sckee_Real
    @Sckee_Real2 жыл бұрын

    Gnome code, can you help me make a game, when I try it doesn’t work.

  • @RobloxStudio_videos_N1
    @RobloxStudio_videos_N110 ай бұрын

    Pleasseeee i need help, so my problem is how to have a LocalPlayer but have this only on a script and not a LocalScript?? PLEASE HELPP

  • @GsBBoyDan
    @GsBBoyDan9 ай бұрын

    It's not working. Did exactly as in the video and it says Error Entrance is not a valid member of Workspace "Workspace" - Client - LocalScript:1 EDIT: Had to put local Part = game.Workspace:WaitForChild("Entrance") first for some reason.

  • @maad_enigma

    @maad_enigma

    8 ай бұрын

    i had the exact same issue. i think this is because script loads in before the part, and the "WaitForChild" thing gives the part time to do so.

  • @chrismangold812

    @chrismangold812

    4 ай бұрын

    yeah script runs b4 part loads in, you can also put like wait(3) on the local script before you run the code

  • @duckblug609

    @duckblug609

    2 ай бұрын

    thank you@@chrismangold812

  • @duckblug609

    @duckblug609

    2 ай бұрын

    or you can use :WaitForChild(OBJECT)

  • @SolarDUSK
    @SolarDUSK2 жыл бұрын

    I need some help with local scripts... why when I turn something visible with a local script, it's invisible on other people's screen?

  • @fartedgamer32

    @fartedgamer32

    Жыл бұрын

    because the local script only works for the client its operating on. if you want everyone to see it visible the use a server script (regular script)

  • @alskopim
    @alskopim2 жыл бұрын

    After a year of trying to script on roblox, I find this guy, who explains it in 9 mins compared to another yt video which took 40 and explained it badly

  • @ps92809

    @ps92809

    2 жыл бұрын

    how did someone take 40 minutes to explain what a local script is

  • @breaddacat7935

    @breaddacat7935

    10 ай бұрын

    @@ps92809 fr

  • @jackinthebeanstalk-mw5bg
    @jackinthebeanstalk-mw5bg10 ай бұрын

    thank

  • @FSHY.
    @FSHY.2 жыл бұрын

    Module script next?

  • @lemonnerd5026
    @lemonnerd50262 жыл бұрын

    I’m only 3 months into coding and I made a elevator and now that I know what local scripts are I can make a invisible potion

  • @tekgewet

    @tekgewet

    2 жыл бұрын

    Kewl, too lazy to start but once I try and get my life together I’ll start

  • @DDan42
    @DDan42 Жыл бұрын

    so basically local scripts are how you make stuff client side..?

  • @The_NoobDeveloper
    @The_NoobDeveloper2 жыл бұрын

    Cool now ik what the difference is

  • @InsanePasta64
    @InsanePasta642 ай бұрын

    How come my studio is calling the name “invalid” I need help on how to fix it

  • @alexis16543

    @alexis16543

    Ай бұрын

    do a wait(3) before it because the script runs before the part even spawns in

  • @hike8932
    @hike8932 Жыл бұрын

    local script is ender chest and normal is chest and module is trapped chest ?

  • @exotic1405
    @exotic14052 жыл бұрын

    Nice

  • @pheo1299
    @pheo12992 жыл бұрын

    Okay, no one has ever answered me on youtube rather than redit or devforum. But how do I make only one client to see what the current client is doing? Like if i touch the part it turns invisible but only for me? i did that but it didnt happen

  • @rucals

    @rucals

    Жыл бұрын

    use local sript instead of script

  • @user-xc2hy1ur2h
    @user-xc2hy1ur2h2 жыл бұрын

    Hey, Gnome, could you do review of Teddy project in Studio?

  • @cliffcoastcafe

    @cliffcoastcafe

    2 жыл бұрын

    You mean his game or a fan game you made if its his game, i might be able to help as i spended way to long studieng it

  • @user-xc2hy1ur2h

    @user-xc2hy1ur2h

    2 жыл бұрын

    @@cliffcoastcafe I mean that I opened Teddy in studio and saw a bunch of scripts that wasn't explained in tutorial series. So I want to know what they do etc.

  • @user-xc2hy1ur2h

    @user-xc2hy1ur2h

    2 жыл бұрын

    I also want to know how much did he do from Premium Payouts, buuuut I believe, that he will not tell me........

  • @cliffcoastcafe

    @cliffcoastcafe

    2 жыл бұрын

    @@user-xc2hy1ur2h he quited his series to make it a public game and made speed builds of the maps. Also the series was never intended to be a tutorial

  • @user-xc2hy1ur2h

    @user-xc2hy1ur2h

    2 жыл бұрын

    @@cliffcoastcafe maybe I am not alone in my wish to see a project's review and if so, maybe he will do it.

  • @MonkyYoutube
    @MonkyYoutube2 жыл бұрын

    Local Scripts: only one player can (see) (something happends)

  • @selevis7563
    @selevis7563 Жыл бұрын

    I just starrted and I wanna learn what everything mean and what everything does

  • @emualmondo
    @emualmondo Жыл бұрын

    I was thinking mabe someone here can answer: How can i make items belong to someone? Ex. If I want to make, lets say, a rideable horse in my game, but only the person that has that horse can ride It. Also there would be multiple horses belonging to different players AND of course, I want the horse to be visible for others too

  • @HowlerNic
    @HowlerNic Жыл бұрын

    had me gone when he put 9 billion robux on his account

  • @Justice1Night
    @Justice1Night2 жыл бұрын

    Do anyone know how do we save a script?

  • @tuzsonpro1007
    @tuzsonpro10072 жыл бұрын

    Can you make an NPC who can walk using MoveTo() command?

  • @nah1247

    @nah1247

    2 жыл бұрын

    Yes u can do NPC.Humanoid:MoveTo(Vector3 position here)

  • @tuzsonpro1007

    @tuzsonpro1007

    2 жыл бұрын

    @@nah1247 i know but they cant move just staying i needed use a free model to can use move to. Like im making a new game idea from: 12 minutes. And i need a cool costum NPC who can walk

  • @nah1247

    @nah1247

    2 жыл бұрын

    @@tuzsonpro1007 then ur prob doing it wrong, ur new to scripting?

  • @tuzsonpro1007

    @tuzsonpro1007

    2 жыл бұрын

    @@nah1247 no, if i use the Rig builder its not works to MoveTo try it

  • @coolpyxl
    @coolpyxl2 жыл бұрын

    Me before at scripting: 💀 me now after watching 😎

  • @alek9194
    @alek91942 жыл бұрын

    cool

  • @ccsv28
    @ccsv282 жыл бұрын

    epic epic

  • @oreoplays7887
    @oreoplays78872 жыл бұрын

    You should do squid game that would get lots of veiws

  • @Waggie_
    @Waggie_3 ай бұрын

    WHAT?? WHY DOESN'T IT WORK IN MY GAME???!!!?

  • @noreally2120

    @noreally2120

    3 ай бұрын

    It’s not working for me either

  • @addanbillis
    @addanbillis2 жыл бұрын

    Hi

  • @pezz9112
    @pezz91122 жыл бұрын

    1:55 0.01 robux nice

  • @oxhah
    @oxhah2 жыл бұрын

    Early

  • @GabblingGary
    @GabblingGary2 жыл бұрын

    :)

  • @davidguo9923
    @davidguo9923 Жыл бұрын

    O

  • @EtherealWS
    @EtherealWS2 жыл бұрын

    First

  • @RealLegoTrex
    @RealLegoTrex2 жыл бұрын

    Local scripts are spooky :0

  • @idknameidk

    @idknameidk

    2 жыл бұрын

    A blue paper with a person looks scary to you?

  • @mrblackblack2802
    @mrblackblack280211 ай бұрын

    Why do you even care to learn how to script when you can just use uncopylocked and stolen Roblox games

  • @chassie_isanerd

    @chassie_isanerd

    11 ай бұрын

    I ain't stealing games, I just wanna create my own concept!

  • @mrblackblack2802

    @mrblackblack2802

    11 ай бұрын

    @@chassie_isanerd Then use uncopylocked games they are not stolen they are uncopylocked

  • @FrozenPrimordial

    @FrozenPrimordial

    10 ай бұрын

    because its fun and theres no fun in just copy and pasting

  • @mrblackblack2802

    @mrblackblack2802

    10 ай бұрын

    @@FrozenPrimordial Whatever Roblox lacks fun SCP games I should just script my own scp game

  • @Erolsaurus

    @Erolsaurus

    6 ай бұрын

    Because uncopylocked Roblox games tend to be old and buggy. And since you don't understand anything about them, you can never fix them.

  • @scalewreckteam
    @scalewreckteam2 жыл бұрын

    cool

  • @EtherealWS
    @EtherealWS2 жыл бұрын

    First

  • @HeroRayOfficial
    @HeroRayOfficial2 жыл бұрын

    First