even after your face reveal, i will still see you as a guy wearing bacon in a tap water suit
@karinhansen3690
3 жыл бұрын
TheDevKing: "When I press C, this block turns yellow" Also TheDevKing: "So this basically means it turns yellow"
@pieTone
2 жыл бұрын
Totally
@sammyinpsl9063
2 жыл бұрын
makes sense though
@PumpyGT
2 жыл бұрын
Reminding, just to be sure
@bush3126
2 жыл бұрын
ah yes that's the most basic it gets, I needed to know that
@theblinkingbrownie4654
4 жыл бұрын
One important thing you forgot to mention, the function runs every time the keypress begins AND when the keypress ends.
@moodymonstrosity1423
4 жыл бұрын
Please elaborate, so when i press to fire and release, will it shoot twice in total in one press?
@projectscriptz
3 жыл бұрын
Yes.
@mrtbts
Жыл бұрын
ohhhh
@lj142
Жыл бұрын
to change its behavior, add a UserInputState parameter in the CAS (Context Action Service) and test smt with it (it will require a UserInputState enumeration)
@limlimy
4 жыл бұрын
I didn't even know this service existed >:0
@slendok4960
4 жыл бұрын
same
@TheDevKing
4 жыл бұрын
Well now you do lol
@DanielP533Scripts
4 жыл бұрын
This is why you use the roblox developers api. Read, watch, Repeat
@MarioMario-yb3iz
4 жыл бұрын
@@DanielP533Scripts whats that
@copycat698
4 жыл бұрын
Mario Mario It contains every code syntax(basic commands to services and more) however it’s a bit hard to understand because it’s more technical which is why most flock to KZitem videos.
@kartarsk5687
4 жыл бұрын
Thank you for all these scripting videos. By far the most helpful tutorials on rblx lua. Please continue making more! p.s. New Sub :)
@TheDevKing
4 жыл бұрын
:D
@goose13378
Жыл бұрын
@@TheDevKing Goose the
@soobway666
4 жыл бұрын
For 7:50, InputBegan has a paramter which is a bool which checks if the engine has already seen if it has been processed already, so It would still work, you would just have to check to see if that bool is true. Anyways, great video!
@guywithmany4522
2 жыл бұрын
Bool?
@oreoz2772
2 жыл бұрын
@@guywithmany4522 local UIS = game:GetService("UserInputService") UIS.InputBegan:Connect(function(input, isTyping) if isTyping then return end So, basically what that does is, if something is already processing the keycode then the event wont fire but instead return
@JackPlaysMinecraft575
Жыл бұрын
this is very useful thanks i always got confused on this one but now i know i may still need user input for other controls
@violetvast5583
3 жыл бұрын
12:23 - Why the action doesn't overwrite is because roblox binded action to right movement isn't "d", It's Enum.Keycode.D. By the way thanks for all your scripting tutorials, thanks to you I'm doing stuff I would never see myself capable of doing, I've got inspired to learn other languages apart from Roblox's Lua. Thank you so much
@abhaypokhriyal2988
3 жыл бұрын
Your mistakes make the tutorials feel more real. Keep up the work, DevKing, you're awesome!
@yoursubconscious1774
2 жыл бұрын
Yeah I feel like a lot of tutorials make it look like programming is all sunshine and butterflies, but you will almost always get errors/bugs
@InfinityBS
2 жыл бұрын
7:55 a way to counter this is by putting another parameter in the InputBegan function called "typing", and you can check if "typing" is false to make sure that the player isn't typing in any TextBox, then continue your function.
@JackPlaysMinecraft575
Жыл бұрын
i've heared if you put in the little "()" you can put in it "Input, GameProccessed" idk what it does but i think its a counterer
@TheLeoGBA
8 ай бұрын
That's what I generally do, and when it sees if it's gameprocessed or not it just returns@@JackPlaysMinecraft575
@juanangelgaelgastelum-nava366
7 ай бұрын
you can put any name, is does the same@@JackPlaysMinecraft575
@christopherball1595
3 жыл бұрын
I read a developer hub article, but it didn't make a lot of sense, but yours explains it better. Also at 8:34 you could also use ProximityPromts, but I am pretty sure it didn't exist in 2019, or early 2020.
@RichRBLX
2 жыл бұрын
yeah i was gonna say that proximity prompts are the best
@izuix5629
3 жыл бұрын
16:01 ᶦᵐ ˢᵒ ᶜᵒⁿᶠᵘˢᵉᵈ
@hub_alt
3 жыл бұрын
Lol
@superzac1485
3 жыл бұрын
If you wanted to use gamepad/controller input, rather than using a string value to bind for example, "t" you could use Enum.KeyCode.T or Enum.KeyCode.ButtonL2 (The left trigger)
@meepwagon8031
3 жыл бұрын
13:54 i think its because you have it binded to the character 'd' or 'D' instead of Enum.KeyCode.D, which is what right movement is binded to
@CHAMP1693
23 күн бұрын
nah it should work anyway
@meepwagon8031
23 күн бұрын
@@CHAMP1693 well i know that now but ur like 3 years too late
@CHAMP1693
22 күн бұрын
@@meepwagon8031 hahaha sorry bro
@wonderrboyplayz924
4 жыл бұрын
wooow this gave me an idea switch light on swtich light of
@amogusamogus8164
29 күн бұрын
@@04Fit was just a mistake
@HauntedBlox
2 жыл бұрын
2:47 voice crack, Nice tutorial tho!
@thatgreenguy6994
7 ай бұрын
If anyone else is getting the error where your script isn't finding your part in the workspace then make sure to rewrite the code to wait for the part because chances are the part didn't load in fast enough for the game to set the action. This is an example incase I explained this wrong: local part = game.Workspace:WaitForChild("Part") instead of local part = game.Workspace.Part
@Sparrow-row
4 күн бұрын
Thanks you
@whydidimakethis9417
4 жыл бұрын
First vid of the decade
@TheDevKing
4 жыл бұрын
lol
@kageman
4 жыл бұрын
What’s the difference between this and userinputservice?
@adacc4997
4 жыл бұрын
Happy New year,i wish you things you want 🙂😁
@hmmtheyesguy
3 жыл бұрын
Ia am from the future and this year is not going wel
@justagenosfan
3 жыл бұрын
@@hmmtheyesguy yeah future isn't going good this year
@MrPeterfranklin
3 жыл бұрын
@@justagenosfan but hopefully this year will be better.
@RandomInternetIdot
4 жыл бұрын
0:00 You sound less energetic
@Kmsyt
Жыл бұрын
Thanks now I made a game with 45 visits with this!
@Kmsyt
Жыл бұрын
Ik it's not a lot but I just came back into coding after 1 year
@witchy4486
Жыл бұрын
@@Kmsyt Honestly thats awesome good job
@Kmsyt
Жыл бұрын
@@witchy4486 thank you man!
@Kmsyt
Жыл бұрын
@@witchy4486 Update: my game got 214 visits! I'm so happy!
@fuuruwu1539
4 жыл бұрын
Omg you deserve millions of subs 💯💯 👍👍 Im your biggest fan
@hub_alt
3 жыл бұрын
Why is there like no comments on this???
@BenOnion
2 жыл бұрын
@@hub_alt because it ony has 2 likes
@__kenjaku
2 жыл бұрын
8:00 all you have to do is UIS.InputBegan:Connect(function(input, gameProcessed) if gameProcessed = true then return end
@randomhandle00
2 жыл бұрын
could just do "if gameProcessed then"
@memelicious7372
4 жыл бұрын
i know i'm late but these tutorials are very useful compared to a lot of other videos. thank you
@Random-pc1cs
Жыл бұрын
TapWater: so see? It is simple KZitem Captions: So C it s simple People who cant understand english by hearing it: 👁👄👁
@ZZZ_Jaydee
4 жыл бұрын
I am becoming a good scripter from you!
@Bbe78
7 ай бұрын
YOUR TUTORIALS ARE VERY WELL EXPLAINED I UNDERSTANDED IT EASILY WITH THE HELP OF YOUR EXPLANATION
@Nathanator
4 жыл бұрын
Finally! Thanks for the amazing tutorial! :)
@jasondiop1704
2 жыл бұрын
Your always here! How are you always here?
@Nathanator
2 жыл бұрын
@@jasondiop1704 I used to be a huge fan of TheDevKing and I would always comment on his videos as soon as they came out lol
@skjllissue
3 жыл бұрын
thank you, I thought i needed something like Player.FocusedChat:Connect(function() ContextActionService:BindAction() end) _(FocusedChat may or may not be an event/something else)_
@bdidk235
4 жыл бұрын
Happy New Year :D
@plastibonic
Жыл бұрын
12:10 go in startergui, get a gui then put it in the place you want, then copy its position and paste its position in the mobile button code
@Brqeni
4 жыл бұрын
Happy New Year Guys :D Where gonna do alot of things this year lol.
@TheDevKing
4 жыл бұрын
Happy new years!
@seovaii
4 жыл бұрын
I'm from the future 😂
@brotachikun149
2 жыл бұрын
thank you, you deserve a subs
@shreddedOrphans
4 жыл бұрын
The function fires twice when i press it One for when i began touching it and one for when i stopped CAN SOMEONE HELP PLS
@GhostTrain_
4 жыл бұрын
The function you use in bind action is automatically passed 3 parameters. That’s why you don’t add the parentheses. The second parameter passed is the input state such as inputBegan. To fix your problem you can add the following to your function: local function handleAction(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then print("Do Action!") end end ContextActionService:BindAction(“Example Action”, handleAction, false, “t”)
@GhostTrain_
4 жыл бұрын
Sorry I’m 6Days late! I hope it helps if you didn’t figure it out already.
@bountengyang4011
3 жыл бұрын
12:00 The reason why the position won't is because the player haven't loaded in, to fix it, make sure the player is loaded in first.
@RetiredCh
4 жыл бұрын
Is it like UserInputService?
@bloxcodes6576
4 жыл бұрын
Nope, they can create on phone buttons Like the jump Burton, a name and of i want a photo
@4TH4RV
4 жыл бұрын
@@bloxcodes6576 you can still make custom button for phones
@justagenosfan
3 жыл бұрын
wow thanks devkingu san
@BrawlBattle
4 жыл бұрын
13:48 "It wouldn't let me move my D." *noice*
@jimmyscripts6557
4 жыл бұрын
Lmao
@regonite1495
4 жыл бұрын
nice
@exzy4438
4 жыл бұрын
happy new year
@TheDevKing
4 жыл бұрын
Happy new year!
@flairewithane
Жыл бұрын
Love it. Thank you. How would I get the players screen to move whilst holding onto the button? Like firing a gun, allowing the player to move around as well
@itsnotloveitslust
4 жыл бұрын
If you set the button to false you can use this instead of UserInputService and will save you time. What's the point of having UserInputService?
@TheDevKing
4 жыл бұрын
They are honestly very similar. You could create an entire game with one or the other. It's really up to personally preference.
@sieunhan1giaytruoc827
Жыл бұрын
Thank you!!!
@09SkyFrost
2 жыл бұрын
how do you do it when you press and hold the button it triggers the keyboard key that makes your sprint for mobile too
@tobiojo3926
4 жыл бұрын
Hello I have already made an animation script so when u press the letter T it does the animation. How would I connect the animation to a button for mobile using this service.
@snowyforest6058
4 жыл бұрын
You did? Tell me how!
@tobiojo3926
4 жыл бұрын
@@snowyforest6058 Bruh the code is easy just use userinputservice then connect the animation to it with a keybind
@MidResolve
Жыл бұрын
13:49 📷💥🤨🤨
@Imbrokeyay
Жыл бұрын
LOL
@niceeadamm
3 жыл бұрын
5:33
@maxwell_edison
3 жыл бұрын
The Title: Beginner to Pro The Video: "I'm confused."
@jakye
4 жыл бұрын
7:58 - gameProcessedEvent can fix that pretty easily.
@tenorHarlequin
4 жыл бұрын
Howso?
@kingnae5383
4 жыл бұрын
or 'isTyping'
@GhostTrain_
4 жыл бұрын
There’s more reasons to use ContextActionService over userinputservice, it just isn’t acting right atm
@bigmsx
Жыл бұрын
@@kingnae5383its the same thing just a diffrent name, isTyping is just the name someone chose to call it, it will still not make you press a button when you are in the menu and press the button, im pretty late but it would be pretty confusing if you thought that applies to everything
@torality2022
Жыл бұрын
Correction: In userinputservice, you can use the GameProcessedEvent to check if player typed the letter. Basically if the player typed T in chat, game processed event would == true.
@elitegamingandmore3723
3 жыл бұрын
16:04 always me
@hub_alt
3 жыл бұрын
Oof
@onirunedisciples
4 жыл бұрын
At 16:30 You forgot to explain why the Part automatically already turned yellow when you started the game even tho you haven't even pressed the "d" key for it to do so....? You also forgot to tell people that when you press the key once, you actually are activating the 'function' two times.... one time when you START pressing the key button, and second time when you let go of it.. Is there a way how to trigger the 'function' only once not two times?
@violetvast5583
3 жыл бұрын
It's A bit more complex than what hes showing in the video, but this should work. You can do this both in local and server scripts to my knowladge. local ACTION = "Action" --The name of the action, you can change it. This will appear in the F9 tab. local function handleAction(actionName, inputState, inputObject) if actionName == ACTION and inputState == Enum.UserInputState.Begin then --Your script here end end
@somepumpkin4146
3 жыл бұрын
Sorry to be so late to this, but there's a way to fix that issue with the chat. UserInputService.InputBegan:Connect(function(key, Chatting) if Chatting == false and key.KeyCode == Enum.KeyCode.E then insert code here end end)
@itsnotloveitslust
4 жыл бұрын
I turned on captions and they said, "Yo, what is up guys, it is *deafening* back with another video
@whoisizzy06
4 жыл бұрын
What if I just my the player on mobile to tap on the GUI
@ivelinapeneva2553
3 жыл бұрын
What
@Ramone.A.Washington
Жыл бұрын
You can do if is typing for userinputservice
@guestyones
4 жыл бұрын
lol for the userinput thinng just put something like IsTyping next to where you put Input and in the script just do if IsTyping then return end its gonna not fire when you type
@slendok4960
4 жыл бұрын
For how long will you keep these series?
@baconmabro1617
3 жыл бұрын
make tutorial hwo to do reload button for qeapon pls!
@hub_alt
3 жыл бұрын
What's a qeapon?
@anjleenadewan5204
3 жыл бұрын
User input service has a variable passed and u can just set. It to false - is typing
@soban4204
3 жыл бұрын
18:39 lol
@daniilka353
2 жыл бұрын
16:01. im so confused 😅
@yamikaen6734
4 күн бұрын
use waitforchild then the name of ur part
@nb04114
Жыл бұрын
You sound like TapWater no cap
@Imbrokeyay
Жыл бұрын
He is tapwater on another yt channel
@NedNise
11 ай бұрын
because he is lmao
@skeptical_playz6142
2 жыл бұрын
My man, ik I’m late but i hope ur not still recording at 1AM!
@garygu6395
4 жыл бұрын
hi tap water
@sortifies5511
4 жыл бұрын
How are you in the star group of roblox when u have 2.5k Subs
@roxout5743
4 жыл бұрын
7:05 That video really contains a smart guy, connecting a Roblox Signal with a method. Stop bullying those threads
@comatose3788
3 жыл бұрын
When you pressed d it turned the square yellow and didn't let you move. You had no toggle on/off, so it didn't continue to stall down ?... maybe
@hyenatheshovel
4 жыл бұрын
Hey tap. Is their a way you can make a button for Xbox. Like what you did with mobile, but to Xbox.
@Dynix7
4 жыл бұрын
Cool
@instancebrick8483
4 жыл бұрын
Can you make a lookvector tutorial?
@TheDevKing
4 жыл бұрын
I might but i explained it sort of in my raycasting video so you may want to watch that one
@roxout5743
4 жыл бұрын
A vector contains multiple components, direction & magnitude define the position. LookVector is typically a part of Coordinate Frames, but that's more basic Vector3 manipulations. I think Roblox didn't implemented it directly in Vectors to make it less confusing. From a LookVector, you can compose RightVector and UpVector which is calculated with a cross product(maths). All you need to know is a LookVector is ONLY a vector3 containing the direction spare and the magnitude is removed.
@modulescript
3 жыл бұрын
13:50 that sounded pretty weird
@Gnapryhehe
4 ай бұрын
Hey so i'm a new developer like maybe weeks and the issue for me is that the button's not shwowing.
@dripbingus4224
3 жыл бұрын
you can just use uis
@slendok4960
4 жыл бұрын
2020 :D
@mignonne_
3 жыл бұрын
Not very happy now hm?
@cosmic_shatter3684
Жыл бұрын
i thought to bind a button you did userinputservice.inputbegan:connect(Function(parameter, parameter) if input.keycode = keybind and not parameter then ... end end)
@juninhoytd8043
2 жыл бұрын
now make another video but with ragdoll knockback
@heyitstonto8715
2 жыл бұрын
8:00 But couldn't you just use the second parameter? Example: UserInputService.InputBegan:Connect(function(input, IsTyping) if input.KeyCode == Enum.KeyCode.T and not IsTyping then end)
@kumodev
2 жыл бұрын
That’s what I thought too but hey it’s always good to learn
@xyhard8603
2 жыл бұрын
How i can change a part color on a client side? Player1 clicks a button and on he s screen a part is blue but player2 see that part as yellow
@Numeristic
3 жыл бұрын
This thought me of a cooldown system for moves....
@urutyjr353
2 жыл бұрын
do you know how to make it like if you were to press one of those buttons it would function what a keyboard's key does
@danklordthememejesus7309
4 жыл бұрын
3:50 this is a time stamp for me
@d_ucksy
3 жыл бұрын
I still dont understand how do you make a button that has a function on a player like a button that makes you ragdoll
@neond00m
4 жыл бұрын
There is a away to use this service for Xbox input too, right?
@tomahawkhd3251
2 жыл бұрын
is there a way where you can press a dpad and bind it to a key?
@FlorizDev
4 жыл бұрын
those buttons are to small and there is no way to fix it
@jacobfabb
4 жыл бұрын
Can you do a series where you make a full game? like if you agree!
@TheDevKing
4 жыл бұрын
I will be soon! :)
@Cloud-ff3dh
2 жыл бұрын
how do i make it holdable? so if they hold the key it will be visible the frame but if you unhold it will not be visible, but if theyre in mobile they just like toggle
@nothing5693
4 жыл бұрын
local func- *Deletes*
@riyan5259
4 жыл бұрын
But how to make it so that a player can hold the button and run it? I want to make a sprinting script and I want the player to hold the button in order to sprint. Please help me :)
@mr.peguin9376
2 жыл бұрын
I am trying to make a fps game on roblox do I replace brick color with shoot , reload , ect?
@CaffeinatedCombatant
3 жыл бұрын
:( these tutorials *never* actually have a script with how to bind it to a key, like if you press the button it outputs the C pressed function to crouch or something, they always just say "IMA PUT THE SCRIPT FOR WHAT YOU WANNA DO IN HERE" instead of "Heres how you can bind the C key to a button" *i need help with this*
@user-ik6vw2jc5r
3 жыл бұрын
UserInputService.InputBegan:Connect(function(input,gameProccesedEvent) if input.KeyCode == Enum.KeyCode.C then game.StarterGui.ScreenGui.TextButton.Visible = true end end), it should work
@ducklacanard
Жыл бұрын
8:44 Proximity prompts didnt exist back then?
@Xarphine
7 ай бұрын
They did, its just if you wanted to make a custom one
@ZZZ_Jaydee
4 жыл бұрын
I am right now making a game with a friend
@Farnciss
3 жыл бұрын
bruh pls how to make two buttons if i make it why the other button disappear
@IvanGarcia-cx5jm
2 жыл бұрын
What advantage this brings that proximity prompts or GUIs don't?
@sparkzo
2 жыл бұрын
proximity prompts didn't exist back then.
@hodataraa9839
4 жыл бұрын
how to make it work multiple times? cause I tried it and wasn't able to make work please help me
@ishy483
4 жыл бұрын
1:10 was the DeleteBaseplateButton from alvinblox's live video about Context Action Service
@julianbradleynadasen1132
2 жыл бұрын
Hi could u help me figuerout how to make it work for gun?
Пікірлер: 267