I just realized tick() is a deprecated feature, meaning it isn't recommended for future work. It's better to use os.time() or os.clock() instead. I will make a future video on keeping track of time using these.
i get distracted really easily when i cant understand something, but the way you explain everything makes it soo much easier for me to understand, you an actual goat bro
Very nice tutorial and watch all the way to the end! But on 24:16 you could also press a different key then press W in less than 0.2 seconds and it will still print
@@BrawlDevRBLX I have a question how would I make it so if a player is on PC then a Icon would appear above their head with a pc logo and everyone whose in the game can see that the players playing on pc or on mobile I want this applied for PC and mobile
Starter Character Scripts: The scripts that will be on your physical roblox character in Workspace. This is useful for scripts that use your character even after they reset/die. Starter Player Scripts: The scripts that will be on your player in game.Players. This is useful for scripts that use your player.
I made an enum code of .touch, so that when mobile players tap the screen they activate their tool, but it's being activated even when they tap just to move their mobile camera instead of shortly taping to activate the tool, how can i fix this?😢
Don’t think you can fix that as players can click really quick to turn cameras or if they want to get precise stuff. If what I read is true the thing actives when the player touches the screen if I were you I would make it when they touch a button on the screen instead of just the screen
hey brawldev am trying to trigger a run by pressing Double tap W but the inputEnd cancels the run just when I let go of W got any way of me Double tap W and then hold till I let go then the runs stop plsssssss help meeee 🙏🙏🙏🙏
Make an counter, like "local Count = 0" and make so if player clicks W it will add +1to counter, wait 2 secs and reset the counter. And if counter is 2 AND the w is pressed, it will run the dash func
Make an counter, like "local Count = 0" and make so if player clicks W it will add +1to counter, wait 2 secs and reset the counter. And if counter is 2 AND the w is pressed, it will run the dash func
local UserInputService = game:GetService("UserInputService") local music = game.SoundService.NoSmoking local musicPlaying = true UserInputService.InputBegan:Connect(function(input, gameProcessedEvent) if gameProcessedEvent then return end if input.KeyCode == Enum.KeyCode.M then if musicPlaying then music.Playing = false musicPlaying = false print("muted") else music.Playing = true musicPlaying = true print("unmuted") end end end)
I just realized tick() is a deprecated feature, meaning it isn't recommended for future work. It's better to use os.time() or os.clock() instead. I will make a future video on keeping track of time using these.
please pin this comment instead of letting it flood
i get distracted really easily when i cant understand something, but the way you explain everything makes it soo much easier for me to understand, you an actual goat bro
this guy has the best series ive seen on scripting, its a shame he doesnt go super in depth into the topics
Very nice tutorial and watch all the way to the end! But on 24:16 you could also press a different key then press W in less than 0.2 seconds and it will still print
That's true! There are definitely a lot of possibilities when it comes to key presses, that's for sure.
@@BrawlDevRBLX I have a question how would I make it so if a player is on PC then a Icon would appear above their head with a pc logo and everyone whose in the game can see that the players playing on pc or on mobile I want this applied for PC and mobile
@@sm3llyfritz58Mostly you have to detect the device first then depending on what platform he is using, you can add a UI on his character
Actually needed this for the gamejam XD
This was something I needed to get more familiar with so... Thank you I guess
bro,s introduction is always funnnnyyyy
MADE IN HEAVEN "ahh intro"
W reference
What's the difference between Starter Character VS Player Script?
Starter Character Scripts:
The scripts that will be on your physical roblox character in Workspace. This is useful for scripts that use your character even after they reset/die.
Starter Player Scripts:
The scripts that will be on your player in game.Players. This is useful for scripts that use your player.
15:56 what if there is a device like a laptop which has a touchscreen? Then it will still identify it as a mobile device or it will not?
It will
yeah i use a laptop w/ touchscreen and it works
ur an actual goat
Another amazing video by BrawlDev; Thank you so much for this guide.
Enum.KeyCode can be used for controllers too
you just need to type ButtonA for example
I just looked into it and yes, you're correct. My apologies on that mistake.
What's the difference between "If isJumping == false then" and "If not isJumping then", or is it the same?
its the same
I made an enum code of .touch, so that when mobile players tap the screen they activate their tool, but it's being activated even when they tap just to move their mobile camera instead of shortly taping to activate the tool, how can i fix this?😢
Don’t think you can fix that as players can click really quick to turn cameras or if they want to get precise stuff. If what I read is true the thing actives when the player touches the screen if I were you I would make it when they touch a button on the screen instead of just the screen
the start of the video: MADE IN HEAVEN!!
thank you
Any possible way to stop input until a function is finished?
This might sound a little dumb, but what is the difference between "If true do" and "If true then?"
i'm pretty sure in lua there is no such thing as if true then, so just use if true do.
@@GamingWithAro thx
hey brawldev am trying to trigger a run by pressing Double tap W but the inputEnd cancels the run just when I let go of W got any way of me Double tap W and then hold till I let go then the runs stop plsssssss help meeee 🙏🙏🙏🙏
Make an counter, like "local Count = 0" and make so if player clicks W it will add +1to counter, wait 2 secs and reset the counter. And if counter is 2 AND the w is pressed, it will run the dash func
Make an counter, like "local Count = 0" and make so if player clicks W it will add +1to counter, wait 2 secs and reset the counter. And if counter is 2 AND the w is pressed, it will run the dash func
I LOVE U BRO
24:08 u need also save last pressed key and here check if it was W
why I cant print in a loacal script
W examples
Made in heaven ahh:
MAIDO IN HEAVEN
00:13 do not pronounce God's name in vain
If you're a christian you should not say things like Oh my God.
first (:
local UserInputService = game:GetService("UserInputService")
local music = game.SoundService.NoSmoking
local musicPlaying = true
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if gameProcessedEvent then
return
end
if input.KeyCode == Enum.KeyCode.M then
if musicPlaying then
music.Playing = false
musicPlaying = false
print("muted")
else
music.Playing = true
musicPlaying = true
print("unmuted")
end
end
end)