ViewportFrames are INSANELY cool

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2025

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

  • @xeromodeus
    @xeromodeus 11 หลายเดือนก่อน +55

    To anybody who's curious, putting all the parts under a WorldModel makes the viewport have physics and much more - meaning that you can code characters and animate them in a ViewportFrame! It's really awesome stuff :)

    • @citizenfoffie7605
      @citizenfoffie7605 10 หลายเดือนก่อน +2

      Is there a way to have it show chatbubbles?

    • @gloryowner1970
      @gloryowner1970 10 หลายเดือนก่อน

      @@citizenfoffie7605 As Far as I know viewport frame is quite limited at the moment, and might not nesacarrily be able to show chat bubbles. (I am not sure myself however, maybe there is a way but I'm doubtful there is tho).

    • @miro_theburger
      @miro_theburger 8 หลายเดือนก่อน

      ​@@citizenfoffie7605use the chat service i guess

    • @scratchyboiiii166
      @scratchyboiiii166 6 หลายเดือนก่อน +2

      Bro I know this sounds stupid but I've been trying to understand how to do this for like a year and you just solved my problem instantly. Thank you soooo much.

    • @xeromodeus
      @xeromodeus 6 หลายเดือนก่อน +1

      @@scratchyboiiii166 Glad that this inexperienced me was able to help you. 🤞

  • @Developer_Max
    @Developer_Max 11 หลายเดือนก่อน +28

    that is very cool! cant wait till ur a multi-million youtuber

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน +18

      you might die before that happens 🤨

    • @Arch-mv5te
      @Arch-mv5te 8 หลายเดือนก่อน +1

      @@crusherfire1 the cooler part is that it WILL happen

  • @yarik_superpro
    @yarik_superpro 11 หลายเดือนก่อน +68

    rip to sysyphus people who used viewportframes as highlights 💀

    • @alex342gwsturk8
      @alex342gwsturk8 11 หลายเดือนก่อน +3

      box handle adornment:

    • @yarik_superpro
      @yarik_superpro 11 หลายเดือนก่อน

      that does not highlight through object and it looks ugly@@alex342gwsturk8

    • @mogayt5156
      @mogayt5156 11 หลายเดือนก่อน +3

      Wdym?

    • @baconheadhair6938
      @baconheadhair6938 8 หลายเดือนก่อน +1

      wydm?

    • @yarik_superpro
      @yarik_superpro 8 หลายเดือนก่อน

      @alex342gwsturk8 this doesn't go through walls and different effect overall.

  • @simplicityd8703
    @simplicityd8703 10 หลายเดือนก่อน +4

    Genuinely one of the best tutorials I've seen on viewport frames. They were such a mystery to me, but this fully cleared it up. Thanks! :D

  • @AbstractAllen
    @AbstractAllen 11 หลายเดือนก่อน +7

    Woah, this is a really good video. I learned more than I was supposed to.

  • @LeafyNebula
    @LeafyNebula 11 หลายเดือนก่อน +3

    Thanks! I would pay for help on advancing this mechanic

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน +2

      Whoa! Thank you for your support!

  • @extremedifficulty9786
    @extremedifficulty9786 11 หลายเดือนก่อน +4

    thank you i have been waiting for this all the other youtubers have over complicated things

    • @rep4791
      @rep4791 10 หลายเดือนก่อน

      ew

  • @jotaye_bs
    @jotaye_bs 11 หลายเดือนก่อน +16

    I was literally wondering some minutes ago how to use viewport frames and then you suddenly upload a video about these.. howwwwwwww?!?!???

  • @RoSo-g2p
    @RoSo-g2p หลายเดือนก่อน

    Omg code assist helped me while typing the script

  • @Plehlowla
    @Plehlowla 6 หลายเดือนก่อน +1

    I like it, lol did catch me off guard that it didn't clone the clothes on the player 💀

  • @snooglebrosplayz
    @snooglebrosplayz 11 หลายเดือนก่อน +1

    You should make a tutorial on inverse kinematics

  • @XaneMyers
    @XaneMyers 11 หลายเดือนก่อน +4

    I wouldn't really say that ViewportFrames are particularly easy to use; The only way to make a part show up is to move it into one, then it feels like the part went to another dimension, making it harder than it should be to line it up with the viewport's camera.
    Another thing that makes ViewportFrames an intermediate difficulty instance is Team Create. For some reason, cameras are removed automatically if you use this feature (which Roblox really wants people to use). If you're making a game that uses it, you pretty much have to create the camera using a script and guess where it's going to point during play-testing.
    I've used one of these myself without issues since I kind of know how to, but these gotchas may throw some developers off. (I used a ViewportFrame for my loading screen, which shows the player's character posing on a platform while it loads the next place.)

    • @codes8300
      @codes8300 11 หลายเดือนก่อน +2

      You don't need to guess where the camera is pointing. You just need to set the CFrame of where you want to position and looking at. or a hacky way to do it is to create a "Reference" Part to where the camera should be placed and looking. You can visualize the camera look direction by just enabling the the reference part's "Show Orientation Indicator" on the Context Menu.

    • @ExoticFoxy
      @ExoticFoxy 11 หลายเดือนก่อน

      Bro can't cook

  • @proglitcher1231
    @proglitcher1231 9 หลายเดือนก่อน +2

    6:31 i just tested and i had no clothes what do I do 💀

    • @SHOIOTERB
      @SHOIOTERB 9 หลายเดือนก่อน

      Because it puts every single part in the portframe without the full model and humanoid

  • @EyeMadness
    @EyeMadness 7 หลายเดือนก่อน +1

    tysm, this will be used for good gaems

  • @MatteoP04ita
    @MatteoP04ita 10 หลายเดือนก่อน

    Bro this is definitely the best video about viewportframes.
    Compliments for your voice too.

    • @MatteoP04ita
      @MatteoP04ita 10 หลายเดือนก่อน

      (subscribed)

  • @JohnsonAttackThatBoomcannon
    @JohnsonAttackThatBoomcannon 10 หลายเดือนก่อน

    I am don't know much about coding but this is really awesome this gives more opportunities to thoses who are willing to make games on roblox. I am trying to figure it out but, I am excited for what the future holds.

  • @bananasfordays7760
    @bananasfordays7760 11 หลายเดือนก่อน

    love ur content dude u need more subs

  • @LordAlgumaCoisa
    @LordAlgumaCoisa 11 หลายเดือนก่อน +1

    they could be better but its better than nothing, before them i would use a module nexus the avenger had created for his roblox battle remake, it would display the 3d models as if it was on UI while it wasn't, viewport are a life saver for now

  • @Roufoxx
    @Roufoxx 5 หลายเดือนก่อน +2

    Hey! If anyone is wondering why their avatar isn't appearing with clothes, it is because the shirts/t-shirts/pants doesn't get copied as they won't get detected by "GetPartBoundsInBox"
    To fix it, you need to handle characters seperately from the other parts and create a character model containing all the local players character objects.
    Here is my script that I made (different from the tutorial but can easily be edited)
    --[[ Game objects ]]
    local gui = script.Parent
    local char = game.Players.LocalPlayer.Character
    -- Creates a model that will contain the childrens of the local character.
    local Character1 = Instance.new("Model")
    Character1.Name = "CharacterModel"
    Character1.Parent = script.Parent.ViewportFrame
    game:GetService("RunService").RenderStepped:Connect(function()

    -- Creates the viewport camera
    local viewportCamera = Instance.new("Camera")
    viewportCamera.CFrame = gui.Adornee.CFrame
    viewportCamera.FieldOfView = 80
    gui.ViewportFrame.CurrentCamera = viewportCamera
    Character1:ClearAllChildren() -- Clears everything in the character model
    -- Clone and update the character parts (contained in the character model)
    for _, v in pairs(char:GetChildren()) do
    if v:IsA("BasePart") or v:IsA("Accessory") or v:IsA("Humanoid") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("CharacterMesh") then
    local bodyPartClone = v:Clone()
    if bodyPartClone:IsA("Humanoid") then
    bodyPartClone.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
    end
    bodyPartClone.Parent = Character1
    end
    end
    -- Clear all other children except the character model
    for _, child in ipairs(script.Parent.ViewportFrame:GetChildren()) do
    if child ~= Character1 then
    child:Destroy()
    end
    end


    -- Kinda janky but stores all the parts in the workspace (excluding the terrain) in a table
    local parts = {}
    for _, v in pairs(workspace:GetChildren()) do
    if v:IsA("BasePart") and v.Name ~= "Terrain" then
    print(v.Name)
    table.insert(parts, v)
    end
    end

    -- Puts all the parts from the "parts" table to the viewport frame excluding the character parts (Bad code but still works I guess)
    for _, part in pairs(parts) do
    if not char:FindFirstChild(part.Name) then
    local clone = part:Clone()
    clone.Parent = script.Parent.ViewportFrame
    end
    end
    end)

  • @DeletedArch
    @DeletedArch 11 หลายเดือนก่อน +3

    so that's how those snapblox systems work
    thanks for tutorial keep up the good work

  • @3beanie
    @3beanie หลายเดือนก่อน

    is there any way to add the clothes too? would "if part:IsA("Shirt") or ("Pants") then" work?

  • @Pay2win_isnotcool
    @Pay2win_isnotcool 11 หลายเดือนก่อน

    bro went from scp to development

  • @andreyromashchenko8967
    @andreyromashchenko8967 5 หลายเดือนก่อน

    Cool, now can you save that viewportframe picture to player’s inventory?

  • @Nukemplaze
    @Nukemplaze 2 หลายเดือนก่อน

    can u plz tell us how to include the clothing

  • @loogigd6193
    @loogigd6193 8 หลายเดือนก่อน

    idea: put this inside of a sniper scope and render whats in front in the frame to have the scope zoomed in but the rest of the screen not zoomed in

  • @izan7925
    @izan7925 2 หลายเดือนก่อน

    How do you get your script panel looking like that

  • @TelaDev
    @TelaDev 5 หลายเดือนก่อน

    Can you save the studio file for us? This will fit my horror game so well!

  • @C47R4_
    @C47R4_ 5 หลายเดือนก่อน

    what u usin to make script editor look like that share w me pls

  • @Eric.31107
    @Eric.31107 11 หลายเดือนก่อน

    remember the time someone made a script that transformed your character into a literal viewport frame making you unkillable

  • @clapstheplug3476
    @clapstheplug3476 7 หลายเดือนก่อน

    How can i make it update everytime the player moves?

  • @brum4
    @brum4 11 หลายเดือนก่อน +2

    i think that it is possible to do realistic reflections

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน +3

      definitely possible

    • @EpicPico0625
      @EpicPico0625 11 หลายเดือนก่อน +1

      Perhaps make it an option so poopy computers don't die

  • @Roufoxx
    @Roufoxx 5 หลายเดือนก่อน

    Hey!
    If anyone is curious why their avatar appears naked in the ViewportFrame, it is because there isn't any Humanoid/Character model
    I made a little script that fixes this problem. Feel free to edit it to your liking!
    ////////////////////////////////////////////
    --[[ Game objects ]]--
    local gui = script.Parent
    local char = game.Players.LocalPlayer.Character
    -- Creates a model that will contain the childrens of the local character.
    local Character1 = Instance.new("Model")
    Character1.Name = "CharacterModel"
    Character1.Parent = script.Parent.ViewportFrame
    game:GetService("RunService").RenderStepped:Connect(function()

    -- Creates the viewport camera
    local viewportCamera = Instance.new("Camera")
    viewportCamera.CFrame = gui.Adornee.CFrame
    viewportCamera.FieldOfView = 80
    gui.ViewportFrame.CurrentCamera = viewportCamera
    Character1:ClearAllChildren() -- Clears everything in the character model
    -- Clone and update the character parts (contained in the character model)
    for _, v in pairs(char:GetChildren()) do
    if v:IsA("BasePart") or v:IsA("Accessory") or v:IsA("Humanoid") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("CharacterMesh") then
    local bodyPartClone = v:Clone()
    if bodyPartClone:IsA("Humanoid") then
    bodyPartClone.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
    end
    bodyPartClone.Parent = Character1
    end
    end
    -- Clear all other children except the character model
    for _, child in ipairs(script.Parent.ViewportFrame:GetChildren()) do
    if child ~= Character1 then
    child:Destroy()
    end
    end


    -- Kinda janky but stores all the parts in the workspace (excluding the terrain) in a table
    local parts = {}
    for _, v in pairs(workspace:GetChildren()) do
    if v:IsA("BasePart") and v.Name ~= "Terrain" then
    print(v.Name)
    table.insert(parts, v)
    end
    end

    -- Puts all the parts from the "parts" table to the viewport frame excluding the character parts (Bad code but still works I guess)
    for _, part in pairs(parts) do
    if not char:FindFirstChild(part.Name) then
    local clone = part:Clone()
    clone.Parent = script.Parent.ViewportFrame
    end
    end
    end)

    • @lemurboi723
      @lemurboi723 5 หลายเดือนก่อน

      Hey, is there a way for this to work as a server script? So other people could see you displaying yourself on the screen with like a camera someplace else

    • @Roufoxx
      @Roufoxx 5 หลายเดือนก่อน

      @@lemurboi723 Hmm... I'm not home right now but there should be a way to do it

    • @lemurboi723
      @lemurboi723 5 หลายเดือนก่อน

      @@Roufoxx i found out, I just made it loop duplicate so everyone sees the same thing regardless like a mirror, but I'm gonna use it like a remote holographic display

    • @Roufoxx
      @Roufoxx 5 หลายเดือนก่อน

      @@lemurboi723 Ok cool!

  • @Typocat
    @Typocat 4 หลายเดือนก่อน

    By the way, you can actually parent a Sky object to a viewport frame, and it will render it as if there was a sky!

  • @illustration3406
    @illustration3406 11 หลายเดือนก่อน +1

    Awesome video! Maybe a tutorial on CharacterController instances soon?

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน +2

      maybe?!?! 🤔

  • @Warp2090
    @Warp2090 11 หลายเดือนก่อน

    you have the same colors as my roblox outfit lol

  • @Vanpirth
    @Vanpirth 8 หลายเดือนก่อน

    how do i clone cloths XD

  • @adamainouss6889
    @adamainouss6889 11 หลายเดือนก่อน

    So it could be possible to have a camera system without having to move the character's cam to the position and simply displaying it on some kind of part (like a screen) ? (ofc with bad quality bu why not)

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน

      yeah, if you want a camera system to display on a part via surface GUI
      however, lots of viewport frames can start to cause performance issues, and it wouldn't make sense to use viewport frames to replace an on-screen camera system

  • @WailTheIdiot
    @WailTheIdiot 11 หลายเดือนก่อน +1

    YOOO YOUR 10 SUBS AWAY FROM 2K!!!

  • @UselessWorm
    @UselessWorm 11 หลายเดือนก่อน

    Why does my character appear not to have clothing?

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน +1

      Because character clothing is stored in separate instances like Shirt and Pants, so in order to copy everything in a character, including clothing, you'd have to copy the whole character model instead of individual parts.

  • @taco-c2m
    @taco-c2m 8 หลายเดือนก่อน

    I have an idea of part 2 for this: portals

  • @Zion_k
    @Zion_k 11 หลายเดือนก่อน

    Ive seen advanced ppl use them to create Portals and Functional reflections

  • @DarthSpeedy
    @DarthSpeedy 11 หลายเดือนก่อน

    This would be neat to use for realtime wanted posters lol

    • @baconheadhair6938
      @baconheadhair6938 8 หลายเดือนก่อน +1

      I think that would be better with just images

  • @Ankitty10
    @Ankitty10 10 หลายเดือนก่อน

    it can actualy can be used in FPS weapon system to make scopes lens'es show the far away and not the original camera decreases the FOV

  • @Lilacmymy7
    @Lilacmymy7 2 หลายเดือนก่อน

    i Like this video how you maked Perfect Camera

  • @TheOgKingEnderKill
    @TheOgKingEnderKill 11 หลายเดือนก่อน +1

    what are youre Studio settings? I really like them

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน +2

      Check out this plugin for some script editor presets:
      create.roblox.com/store/asset/3617323299

    • @TheOgKingEnderKill
      @TheOgKingEnderKill 11 หลายเดือนก่อน

      @@crusherfire1 thanks

  • @matrixgeg
    @matrixgeg 11 หลายเดือนก่อน +1

    can i do it with 2d not 3d?

  • @ArnyDab
    @ArnyDab 11 หลายเดือนก่อน +1

    Help. What is adornee?

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน +1

      Adornee is a property that refers to the object that the GUI is going to be adorned onto.
      Adorn means "to enhance the appearance of", so the object that is having its appearance enhanced is the adornee.
      The main utility of the property is the ability to place the SurfaceGui anywhere in your game without it needing to directly be a child of a certain part. This allows us to place SurfaceGuis in StarterGui.
      If there is no adornee property set, the SurfaceGui will adorn onto it's parent (if it's a part) by default.

    • @ArnyDab
      @ArnyDab 11 หลายเดือนก่อน

      @@crusherfire1 Thanks!

  • @A_randomrobloxdev3367
    @A_randomrobloxdev3367 11 หลายเดือนก่อน

    Thx bro

  • @TheOgKingEnderKill
    @TheOgKingEnderKill 11 หลายเดือนก่อน +1

    why is my avatar naked when i take a photo

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน

      because clothing is based on instances that are not decals, so you would have to copy the entire character models rather than the parts individually

    • @TheOgKingEnderKill
      @TheOgKingEnderKill 11 หลายเดือนก่อน +1

      @@crusherfire1 how can i do that

  • @666thmoab
    @666thmoab 11 หลายเดือนก่อน

    Scripts dont run idk why

  • @malfunctional1930
    @malfunctional1930 2 หลายเดือนก่อน

    do you know how to make something similar to how cart ride for corn dog did their 8 directional sprites for players? i've been trying to figure this out for a while to no avail..

  • @ps_lol
    @ps_lol 11 หลายเดือนก่อน

    mirror system is good
    u can make their camera into mirror but it has issue, u can see ur own inside so yea is sad

  • @shomit0646
    @shomit0646 4 หลายเดือนก่อน

    Can't you technically make a mirror if you make it a while loop?

  • @RoSo-g2p
    @RoSo-g2p หลายเดือนก่อน

    Uh script broken?

  • @madnessmyth
    @madnessmyth 11 หลายเดือนก่อน

    Textures are bugged in ViewportFrames.

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน

      You just need to copy the whole character model (which contains instances like Pants and Shirt)

    • @potolog101
      @potolog101 11 หลายเดือนก่อน

      @@crusherfire1 or just copy the pants and shirts along with the others parts

    • @madnessmyth
      @madnessmyth 11 หลายเดือนก่อน

      @@crusherfire1 Oh, right, shirt and pants aint a part.. whoops.. But textures are broken. I tested that.

    • @Idiskjsjsjjsjsjsbhshshshsh
      @Idiskjsjsjjsjsjsbhshshshsh 11 หลายเดือนก่อน

      @@potolog101 Won't work, it has to be a model with a humanoid.

    • @potolog101
      @potolog101 11 หลายเดือนก่อน

      @@Idiskjsjsjjsjsjsbhshshshsh keyword : OTHER parts (referring as in instances)

  • @owenrossier3500
    @owenrossier3500 10 หลายเดือนก่อน

    why did it made my character naked?

    • @crusherfire1
      @crusherfire1  10 หลายเดือนก่อน

      it copies only the parts over and the clothing instances are not parts, so you would need to detect if its a character, and if so, just copy the whole character (and delete any scripts inside of the copied character)

    • @owenrossier3500
      @owenrossier3500 10 หลายเดือนก่อน

      @crusherfire1 what does the script look like with the problem because it threw me an error.

  • @Mavve69
    @Mavve69 11 หลายเดือนก่อน

    *How would one make a disposable camera, or just a normal camera, with this?*
    How would I incorporate the movement and the fact that it’s being held?
    And, how would I make it capture more then just a small portion of the nearby area?

  • @PreamOffical
    @PreamOffical 10 หลายเดือนก่อน

    imagen making tik tok or youtube shorts in roblox

  • @Musa313
    @Musa313 10 หลายเดือนก่อน

    It's bigger on the inside! great for creating TARDIS'es

  • @user-wy2el6kb1l
    @user-wy2el6kb1l 10 หลายเดือนก่อน

    why does only my head show instead of my whole body

  • @MagAgent006-qj5nm
    @MagAgent006-qj5nm 5 หลายเดือนก่อน

    we making real working monitor with this one 🔥🔥

  • @ultimate_masterpiece
    @ultimate_masterpiece 11 หลายเดือนก่อน +4

    AYEEE HE USED MY VIDEO IDEA

  • @cbob81514
    @cbob81514 11 หลายเดือนก่อน

    it deleted all my clothes, i guess i need to fix it

  • @danilowich
    @danilowich 3 หลายเดือนก่อน

    how to make particles work in viewport model

  • @myriadtechrepair1191
    @myriadtechrepair1191 8 หลายเดือนก่อน

    I have a problem! xD It thinks my character is naked.

  • @gamingwithlilabe3711
    @gamingwithlilabe3711 2 หลายเดือนก่อน +1

    8 Months, Lol!

  • @Hittzo
    @Hittzo 11 หลายเดือนก่อน

    ok

  • @Hockets
    @Hockets 8 หลายเดือนก่อน

    The must shitty thing about this feature is that surface gui wont work on viewportframe

    • @misovfb
      @misovfb 2 หลายเดือนก่อน

      You can put the surfacegui in playergui and putting the adornee to the part you want to display it

  • @m3s5_0f_numb3r5
    @m3s5_0f_numb3r5 11 หลายเดือนก่อน

    This would have been so helpful to me if I didn’t already know how ViewportFrames work. 😢
    Also I think it’s really stupid that we can’t have Lighting Effects for ViewportFrames.
    But what isn’t stupid is this video. 👍

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน

      maybe in the future when Roblox improves their engine

    • @m3s5_0f_numb3r5
      @m3s5_0f_numb3r5 11 หลายเดือนก่อน

      @@crusherfire1 That’s assuming they ever will. (They won’t, but they will make it worse ☺️)

  • @ajcharatrachoo6070
    @ajcharatrachoo6070 5 หลายเดือนก่อน

    I got an error: Players.Aiden714T.PlayerGui.SurfaceGui.LocalScript:3: attempt to index nil with 'CFrame'

  • @mr_stingers-u4f
    @mr_stingers-u4f 5 หลายเดือนก่อน

    Where the fuck is the link

  • @SimpleMade_
    @SimpleMade_ 6 หลายเดือนก่อน

    New title how to make a camera in game

  • @nullagoat
    @nullagoat 11 หลายเดือนก่อน

    do you have a discord?

    • @crusherfire1
      @crusherfire1  11 หลายเดือนก่อน

      I have a server, but it's not public