#Animation Display on StarterGui

1 messages · Page 1 of 1 (latest)

dusk pelican
#

i asked AI to help me and it said i had to use a viewport display (correct me if i am wrong please) and whenever i insert a part or use a localscript to show an animation on the player, it doesn't show.

CONTEXT: I'm trying to make a menu that shows a clone of the player's avatar dancing on the side using a ViewportDisplay, but it's not showing

#

` local viewport = script.Parent:WaitForChild("DancePreview")

-- Create a part to test visuals
local part = Instance.new("Part")
part.Size = Vector3.new(2, 3, 1)
part.Position = Vector3.new(0, 1.5, 0)
part.Anchored = true
part.BrickColor = BrickColor.new("Bright red")

-- Camera setup
local camera = Instance.new("Camera")
camera.CFrame = CFrame.new(Vector3.new(0, 2, 6), Vector3.new(0, 1.5, 0))
viewport.CurrentCamera = camera
camera.Parent = viewport

-- Model to hold the part
local model = Instance.new("Model")
part.Parent = model
model.PrimaryPart = part
model:SetPrimaryPartCFrame(CFrame.new(0, 0, 0))
model.Parent = viewport `

#

this was made with ai by the way

obtuse parcel
dusk pelican
obtuse parcel
#
  1. does the viewport show anything
dusk pelican
obtuse parcel
#

can you show like a video of ur game running

dusk pelican
#

k

obtuse parcel
#

i can see 2 outcome rn

  1. the ai just made crap
  2. the cframe positioning didnt work but the script did and you just have to reposition the camera
obtuse parcel
dusk pelican
thorny sandalBOT
#

studio** You are now Level 1! **studio

obtuse parcel
#

interesting

dusk pelican
#

its sort of laggy sorry

#

i have an ass pc

obtuse parcel
#

the viewport is empty

dusk pelican
#

there is a local script inside it, which is supposed to show a red cube

obtuse parcel
#

can u check the console for any errors

dusk pelican
#

nothing too serious from my end

obtuse parcel
#

thats just part of the error

dusk pelican
#

skip to the end

#

the whole video is just my pc struggling

#

hold up

viral fox
# dusk pelican

there is no child called DancePreview of parent DancePreview

obtuse parcel
#

bit late but yeah as barrier said menucamera cannot be found

#

either u didnt add it or

#

it already loaded

dusk pelican
dusk pelican
obtuse parcel
#

this means if it loads before the waiforchild starts

#

then the wait will wait infinitely

#

idk why roblox is like this but yea

#

thats how it works

dusk pelican
#

let me try that and i'll let u know

obtuse parcel
#

then after that

#

findfirstchild blah blah blah

dusk pelican
#

okay

dusk pelican
#

` while not script.Parent:FindFirstChild("DancePreview") do
task.wait()
end

local viewport = script.Parent:FindFirstChild("DancePreview")

local camera = Instance.new("Camera")
camera.CFrame = CFrame.new(Vector3.new(0, 2, 6), Vector3.new(0, 2, 0))
camera.Parent = viewport
viewport.CurrentCamera = camera

local part = Instance.new("Part")
part.Size = Vector3.new(2, 3, 1)
part.Position = Vector3.new(0, 1.5, 0)
part.Anchored = true
part.BrickColor = BrickColor.new("Bright red")

local model = Instance.new("Model")
part.Parent = model
model.PrimaryPart = part
model:SetPrimaryPartCFrame(CFrame.new(0, 0, 0))
model.Parent = viewport `