Roblox Studio - How to make Smooth Player Run Script
HTML-код
- Опубликовано: 6 фев 2025
- Script Below
-- Services --
local UIS = game:GetService("UserInputService")
local TS = game:GetService("TweenService")
-- Variables --
local Player = game.Players.LocalPlayer
local HUM = Player.Character:FindFirstChild("Humanoid")
-- Settings --
local RunSpeed = 30
local BaseSpeed = 16
local TransitionTime = 2
local Key = "LeftShift"
-- Script --
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode[Key] then
TS:Create(HUM, TweenInfo.new(TransitionTime), {WalkSpeed = RunSpeed}):Play()
end
end)
UIS.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode[Key] then
TS:Create(HUM, TweenInfo.new(TransitionTime), {WalkSpeed = BaseSpeed}):Play()
end
end)
This video seems to do really well, I'm happy all of you are enjoying it and finding it useful. Be sure to check out my other videos.
I made a new video about making a Smooth Camera, here is the link for it, I hope you'll enjoy it
Roblox Studio - Smooth Camera : ruclips.net/video/x-aB_XgFRX4/видео.htmlsi=HsFFjdEfZPC3pxUL
Straight to the point. Concise and easy to learn. Much thanks! Keep doing these tutorials. Love you man!
Hvala puno brate na ovome
Very nice video,you will go far
thank you very much❤ + we need tutorial how to make shop dealer
What kind of shop dealer were you thinking of? Would it be entirely GUI based or a mix of GUI and camera pointing to the thing you want to buy? Or perhaps similar to Lumber Tycoon 2 system where you drag items on the counter and buy them that way, It could also be done by pressing a button or clicking on items you want to buy that would trigger GUI for buying them?
@@stars7438 I WANT SWORD DEALER LIKE ONE PIECE GAME ( BLOX FRUIT , KING LEGACY ) PRESS BUTTON AND I WILL GET IT
A Lerp function with deltatime calculation is better for most cases but otherwise the code is pretty good
really cool video, can you show us how to make mobile only UI for running?
Yes I will, thanks for the idea!
Here is the link for the video you requested! : )
ruclips.net/video/qN2iAJebYoU/видео.html
@@stars7438 that was so fast, thank you!
Cool
Not the best way to make a player's speed accelerate but great for beginners!
hey would like to be a scripter for my friend kingdom hearts game
I'd love to but I'm currently occupied on a project of my own, so I'd have to reject your offer for now, thanks for the offer, I'm glad you think I'd be a good fit for the team!