Make Your Own Dash Script in Minutes! | Roblox Essentials #6

  Рет қаралды 535

Solepsus

Solepsus

Күн бұрын

Пікірлер: 11
@xxneweraxx7422
@xxneweraxx7422 Ай бұрын
nice tutorial, do add guard clauses and for a complementary thing, you could perhaps just include those elements in the server storage (or well, replicatedstorage i guess depending on where you want latency) and copy them to your humanoidrootpart, in order to avoid setting the options again and again
@dave10101
@dave10101 3 ай бұрын
W vid
@Munkivr
@Munkivr 3 ай бұрын
Make it in minutes. 30. Make it in half an hour.
@SolepsusYT
@SolepsusYT 3 ай бұрын
Well after this video you should be able to make one yourself in minutes. Explaining the logic behind my code was a majority of the video
@Munkivr
@Munkivr 3 ай бұрын
@@SolepsusYT oh ok
@hyperblox7809
@hyperblox7809 Ай бұрын
outdated but still works with some changes, ty
@SolepsusYT
@SolepsusYT Ай бұрын
is it outdated? which part?
@hyperblox7809
@hyperblox7809 Ай бұрын
@ had to change a few lines for it to works + it breaks if you die, interact with something
@SolepsusYT
@SolepsusYT Ай бұрын
@@hyperblox7809 i see, if you have any other issues just lmk!
@Tettzz
@Tettzz 3 ай бұрын
local uis = game:GetService("UserInputService") local RS = game:GetService("ReplicatedStorage") local player = game:GetService("Players").LocalPlayer local char = player.Character or player.CharacterAdded:Wait() local hum = char:WaitForChild("Humanoid") local Root = char:WaitForChild("HumanoidRootPart") local StaminaManager = require(game.ReplicatedStorage.StmHandlerFolder.StaminaManager) local canRoll = true local maxStamina = 100 local cam = game.Workspace:WaitForChild("Camera") local rollDepletionAmount = 30 local function rollMotion(direction, animtrack) animtrack:Play() --play animation script.DashSound:Play() local BV = Instance.new("BodyVelocity") BV.MaxForce = Vector3.new(30000, 0, 30000) BV.Parent = Root local canLoop = true task.spawn(function() task.wait(0.18) --animation length canLoop = false end) while true do if canLoop == false then break end local c1 = Vector3.new(cam.CFrame.X, Root.CFrame.Y, cam.CFrame.Z) local c2 = cam.CFrame * CFrame.new(0, 0, 2) local c3 = Vector3.new(c2.X, char.HumanoidRootPart.CFrame.Y, c2.Z) local DD = CFrame.new(c1, c3)*CFrame.Angles(0, math.rad(direction), 0) BV.Velocity = DD.lookVector * 60 --change number for higher speed task.wait(0.04) --CFrame update speed end BV:Destroy() end uis.InputBegan:Connect(function(key) if key.KeyCode == Enum.KeyCode.Q then local stamina = StaminaManager.getStamina() --check if: character loaded, player has enough stamina, debounce, player is moving if char and Root and stamina >= rollDepletionAmount and canRoll == true and hum.MoveDirection.Magnitude > 0 then canRoll = false StaminaManager.updateStamina(-rollDepletionAmount, player) --subtract stamina --check if player uses ShiftLock if uis.MouseBehavior == Enum.MouseBehavior.LockCenter then if uis:IsKeyDown(Enum.KeyCode.W) then --dash forward local direction = -180 local animtrack = hum.Animator:LoadAnimation(script.FrontDash) rollMotion(direction, animtrack) elseif uis:IsKeyDown(Enum.KeyCode.S) then --dash backwards local direction = 0 local animtrack = hum.Animator:LoadAnimation(script.BackDash) rollMotion(direction, animtrack) elseif uis:IsKeyDown(Enum.KeyCode.A) then --dash to the left local direction = -90 local animtrack = hum.Animator:LoadAnimation(script.LeftDash) rollMotion(direction, animtrack) elseif uis:IsKeyDown(Enum.KeyCode.D) then --dash to the right local direction = 90 local animtrack = hum.Animator:LoadAnimation(script.RightDash) rollMotion(direction, animtrack) end else --if ShiftLock is off then do only front dash if uis:IsKeyDown(Enum.KeyCode.W) then local direction = -180 local animtrack = hum.Animator:LoadAnimation(script.FrontDash) rollMotion(direction, animtrack) elseif uis:IsKeyDown(Enum.KeyCode.S) then local direction = 0 local animtrack = hum.Animator:LoadAnimation(script.FrontDash) rollMotion(direction, animtrack) elseif uis:IsKeyDown(Enum.KeyCode.A) then local direction = -90 local animtrack = hum.Animator:LoadAnimation(script.FrontDash) rollMotion(direction, animtrack) elseif uis:IsKeyDown(Enum.KeyCode.D) then local direction = 90 local animtrack = hum.Animator:LoadAnimation(script.FrontDash) rollMotion(direction, animtrack) end end task.wait(1.5) --cooldown canRoll = true end end end)
@SolepsusYT
@SolepsusYT 3 ай бұрын
unnecessarily long, and something like stamina should probably not be locally stored
Can you make a VR game in Scratch? (devlog #1)
10:00
STEM MC
Рет қаралды 140 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
I Made a Discord Server in 1 Minute, 10 Minutes & 1 Hour
16:16
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,4 МЛН
How to make Dash ability and Moving Part | Roblox Studio 2024
17:12
Create leaderboards easily! | Roblox Essentials #1
6:42
Looking into Roblox "Malware"
21:38
Hoofer
Рет қаралды 60 М.
Making INSANE PROGRESS In ROBLOX STUDIO | Roblox Devlog #2
6:38
The Animators So Good, Mojang Hired Them
12:58
XayXay
Рет қаралды 1,5 МЛН
USING HACKS TO TEST MY STAFF
18:25
Skeppy
Рет қаралды 259 М.
I Beat Minecraft From One Grass Block
35:27
Beppo
Рет қаралды 7 МЛН
Are these free drawing apps worth it? (for PC)
23:49
pikat
Рет қаралды 875 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН