RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a script that when you old shift you speed with tween teleport"
-- local script local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local Players = game:GetService("Players") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local isSprinting = false local function onInputBegan(input, gameProcessedEvent) if input.KeyCode == Enum.KeyCode.LeftShift and not isSprinting then isSprinting = true local originalSpeed = humanoid.WalkSpeed humanoid.WalkSpeed = 50 local tweenInfo = TweenInfo.new(0.25) local tween = TweenService:Create(humanoid, tweenInfo, {WalkSpeed = originalSpeed}) tween:Play() isSprinting = false end end UserInputService.InputBegan:Connect(onInputBegan)