Levitate Part | Roblox Scripting Tutorial

Поділитися
Вставка
  • Опубліковано 29 гру 2020
  • In this video i teach you how to make a part that is levitating. Please subscribe to my channel! :)

КОМЕНТАРІ • 45

  • @xSweDev
    @xSweDev  3 роки тому +6

    Let me know if you have an idea what i should make a video on next!

  • @user-ku8cs6ku5k
    @user-ku8cs6ku5k 10 місяців тому +1

    This really helped with my game! I would definitely recommend this to people trying
    to make a levitating object.

  • @JustyRBLX
    @JustyRBLX 3 роки тому

    Thank you so much! Now I can make the floating effect for my Golden Orb! :)
    You deserve a like and a sub!

  • @peri.winkle
    @peri.winkle 3 роки тому +4

    seriously dude... you're a lifesaver 👍

  • @yicewie
    @yicewie Рік тому

    seriously man.. YOU SAVED MY LIFE!i was searching in yt how to make a floating part and it only apear only the floating part! tysm for existing!

  • @Lucne14
    @Lucne14 6 місяців тому

    thank you!! It made my game cooler

  • @denissea.7190
    @denissea.7190 2 роки тому +1

    Thank you so much!!

  • @TropicalMiloGaming
    @TropicalMiloGaming 10 місяців тому

    Good tutorial

  • @Etohl
    @Etohl Рік тому

    Thank you so much!

  • @MalikChildish
    @MalikChildish 9 місяців тому

    W!

  • @JustAnBaconBoi3550
    @JustAnBaconBoi3550 11 місяців тому +1

    Thanks this helped a lot I am making a game based off the movie nope

  • @zadarestebanjimenezsarria2241
    @zadarestebanjimenezsarria2241 10 місяців тому

    thank you!

  • @velocitygaming7037
    @velocitygaming7037 3 місяці тому

    does this work on a rig character?
    im tryna make my character float

  • @Hypertrichosis-gj6ye
    @Hypertrichosis-gj6ye 4 місяці тому +1

    whats the point of putting tick in the "YPos" script?

  • @zoula4380
    @zoula4380 3 місяці тому

    This video was great, but i think the script can use runservice stepped funtion instead of using while true do

  • @morerat69
    @morerat69 Місяць тому

    How do you make the floating part not go up and down so much?

  • @Just__Josh
    @Just__Josh 11 місяців тому

    Ik this was 2 years ago but i got a question. How do you make it float up and down but without the spinning?

    • @xSweDev
      @xSweDev  11 місяців тому

      You just gotta remove the "Rotation" script

  • @Bloxbuild3r01
    @Bloxbuild3r01 18 днів тому

    Hi I dont know how to script in roblox studio but I wanna make a game where you float and then after 30 seconds you die if you dont reach the end. Do you know any way to do this? If you can ill sub and reccomend u to loads of ppl :)

  • @psyhelxove
    @psyhelxove 3 місяці тому

    does this work with models?

  • @jaredblock6398
    @jaredblock6398 Рік тому

    How can I change the distance and speed of the floating? I would like it to float faster and higher.

    • @xSweDev
      @xSweDev  Рік тому +1

      You can change the speed by multiplying the tick() with a number, and you can change the height by multiplying the math.sin(tick()) by a number.
      An example of this could be:
      math.sin(tick() * 2) * 3
      This would make it go two times faster and three times higher

    • @jaredblock6398
      @jaredblock6398 Рік тому +1

      @@xSweDev Thank you!

    • @_Erinn_667
      @_Erinn_667 Рік тому

      @@xSweDev you forgot the ) at the end :D

  • @Maaaar
    @Maaaar Рік тому

    how can you do this on r6?

  • @Crookmega312
    @Crookmega312 Рік тому

    How can i do with model and it have parts i want to levitate whole model

    • @is15140
      @is15140 Рік тому

      in each part of the model put the same script on each part of the model

    • @freddospaghettio3157
      @freddospaghettio3157 Рік тому +2

      just weld everything together

  • @satomisprings
    @satomisprings 11 місяців тому +7

    the script for levitation for the other people and for me just copy and paste it in your roblox script (levitation script)
    local part = script.Parent
    local startPos = part.Position
    while true do
    wait()
    part.Position = startPos + Vector3.new(0,math.sin(tick()),0)
    end

    • @garfield2317
      @garfield2317 7 місяців тому +3

      correct version:
      local part = script.Parent
      local startPos = part.Position
      while true do
      wait()
      part.Position = startPos + Vector3.new(0,math.sin(tick()),0)
      end

    • @satomisprings
      @satomisprings Місяць тому

      where is the difference@@garfield2317

    • @satomisprings
      @satomisprings Місяць тому

      theres no difference@@garfield2317

  • @Judzt
    @Judzt 3 роки тому +4

    script it might not work bc i might of did something wrong
    Rotations script
    local TweenSeverice = game:GetService ("TweenService")
    local part = script.Parent
    local goal = {}
    goal.Orientation = Vector.new(0,360,0
    local tweeninfo = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.in, 2, flase 0)
    local tween = Tween Service:Create(part, TweenInfo, goal)
    while true do
    Tween:Play()
    tween.Completed;Wait()
    end
    YPos script
    local part = script.Parent
    local startPos = part.Position
    while true do
    wait()
    part.Position = startPos + Vector3.new(0,match.sin(tick()),0)
    end

    • @thunderwolf9570
      @thunderwolf9570 Рік тому +2

      Rotation Script:
      Line 5 (goal.Orientation) - need a ) at the end
      Line 7 (local tweeninfo =) - you spelled "false" wrong and need a comma after false as well. "In" should be capitalized as well.
      Line 9 (local tween =) - No space between "Tween" and "Service"
      Line 12 (Tween:Play()) - "Tween" should not be capitalized.
      Line 13 (tween.Completed) - you have a semicolon ( ; ) instead of a colon ( : )
      YPos Script
      Seems fine.

    • @Hello-Off
      @Hello-Off Рік тому

      Updated version of the rotation script:
      local TweenService = game:GetService ("TweenService")
      local part = script.Parent
      local goal = {}
      goal.Orientation = Vector3.new(0,360,0)
      local tweeninfo = TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 2, false, 0)
      local tween = TweenService:Create(part, TweenInfo, goal)
      while true do
      tween:Play()
      tween.Completed:Wait()

      end

    • @friedfox4982
      @friedfox4982 Рік тому

      @@thunderwolf9570 the y pos script overall is fine but instead of saying match is says math on the 6th line

    • @_Erinn_667
      @_Erinn_667 Рік тому

      ypos one instead of math you wrote match

  • @craftedpizza
    @craftedpizza Рік тому

    Works great but I can't get a group to move even tho all the parts a welded together

    • @hiimzoku
      @hiimzoku 10 місяців тому

      use weld constraints

  • @alternateB
    @alternateB Місяць тому

    i dont mean to be mean but you dont have to do all of that to make a part spin i mean look at this easy script i made
    local --your part name here-- = script.Parent
    while true do
    --your local variable here--.Orientation = --your local variable here--.Orientation + Vector3.new(0, 1, 0)
    wait(0.01)
    end
    this is why sometimes i feel like people only make their scripts complicated to make their videos longer

    • @xSweDev
      @xSweDev  Місяць тому

      I was farily new to scripting when uploading this video. I could easily improve this, but theres no point.

    • @alternateB
      @alternateB Місяць тому

      oh my bad sorry

  • @user-yd6sb2ol6z
    @user-yd6sb2ol6z Рік тому +1

    doesnt work

  • @j6bv
    @j6bv 2 місяці тому

    not work ❤️‍🩹