Roblox Studio : สอนทำDashในแมพวันพีช

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.พ. 2025
  • ให้เพิ่มLocal ScriptในStarterChracterScriptก่อนแล้ว
    คัดลอกสคิปนี้ไปใส่
    local player = game.Players.LocalPlayer
    local plr = game.Players.LocalPlayer
    local Char = plr.Character or plr.CharacterAddeed:Wait()
    local UIS = game:GetService("UserInputService")
    local humanoid = player.Character.Humanoid
    local debounce = false
    local cooldown = 0.1 -- Time to wait between 3 dash
    local anim = Instance.new("Animation")
    anim.AnimationId = "www.roblox.com/..."--Insert ID here
    UIS.InputBegan:Connect(function(input,IsTyping)
    if IsTyping then
    return
    elseif input.KeyCode == Enum.KeyCode.Q then
    if debounce == false then
    debounce = true
    local playAnim = humanoid:LoadAnimation(anim)
    playAnim:Play()
    local Character = game.Workspace:WaitForChild(player.Name)
    Char.HumanoidRootPart.Velocity = Char.HumanoidRootPart.CFrame.lookVector*150
    local Trail1 = Instance.new("Trail",Character)
    Trail1.Attachment0 = Character.RightFoot:FindFirstChildOfClass("Attachment")
    Trail1.Attachment1 = Character.RightLowerLeg:FindFirstChildOfClass("Attachment")
    Trail1.Lifetime = 0.2
    Trail1.MaxLength = 0.5
    Trail1.WidthScale = NumberSequence.new(0.8)
    Trail1.FaceCamera = false
    local Trail2 = Instance.new("Trail",Character)
    Trail2.Attachment0 = Character.LeftFoot:FindFirstChildOfClass("Attachment")
    Trail2.Attachment1 = Character.LeftLowerLeg:FindFirstChildOfClass("Attachment")
    Trail2.Lifetime = 0.2
    Trail2.MaxLength = 0.5
    Trail2.WidthScale = NumberSequence.new(0.8)
    Trail2.FaceCamera = false
    local Trail3 = Instance.new("Trail",Character)
    Trail3.Attachment0 = Character.LeftLowerArm:FindFirstChildOfClass("Attachment")
    Trail3.Attachment1 = Character.LeftHand:FindFirstChildOfClass("Attachment")
    Trail3.Lifetime = 0.2
    Trail3.MaxLength = 0.5
    Trail3.WidthScale = NumberSequence.new(0.8)
    Trail3.FaceCamera = false
    local Trail4 = Instance.new("Trail",Character)
    Trail4.Attachment0 = Character.RightLowerArm:FindFirstChildOfClass("Attachment")
    Trail4.Attachment1 = Character.RightHand:FindFirstChildOfClass("Attachment")
    Trail4.Lifetime = 0.25
    Trail4.MaxLength = 0.5
    Trail4.WidthScale = NumberSequence.new(0.8)
    Trail4.FaceCamera = false
    local Trail5 = Instance.new("Trail",Character)
    Trail5.Attachment0 = Character.UpperTorso:FindFirstChildOfClass("Attachment")
    Trail5.Attachment1 = Character.LowerTorso:FindFirstChildOfClass("Attachment")
    Trail5.Lifetime = 0.25
    Trail5.MaxLength = 0.5
    Trail5.WidthScale = NumberSequence.new(0.8)
    Trail5.FaceCamera = false
    wait(.5)
    for i = 0,1, .1 do
    Trail1.Transparency = NumberSequence.new(i)
    Trail2.Transparency = NumberSequence.new(i)
    Trail3.Transparency = NumberSequence.new(i)
    Trail4.Transparency = NumberSequence.new(i)
    Trail5.Transparency = NumberSequence.new(i)
    wait()
    end
    Trail1:remove()
    Trail2:remove()
    Trail3:remove()
    Trail4:remove()
    Trail5:remove()
    wait(cooldown)
    debounce = false
    end
    end
    end)

ความคิดเห็น • 11