SurfaceGui script doesn't work the same like ScreenGui script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    So, I have been trying to get this code for a progress bar work but I prefer it to be in the 3D world

local Player = game.Players.LocalPlayer
local Stage = Player:WaitForChild(“Hiddenleaderstats”).ObbiesCompleted
local maxStages = 100
local TweenService = game:GetService(“TweenService”)

local function Tween()
TweenService:Create(script.Parent, TweenInfo.new(0.3), {Size = UDim2.new(Stage.Value/maxMoney,0,1,0)}):Play()
end

Tween()
Stage.Changed:Connect(function()
Tween()
end)

  1. What is the issue? Include screenshots / videos if possible!
    I’m new to scripting so I don’t really know the difference of SurfaceGUI and ScreenGUI in technical terms when it comes to scripting, the progress bar in ScreenGui works but for the part in workspace that has the SurfaceGui doesn’t.

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried reading on the learn page of creator hub for screenGui and starterGui but I didn’t really find anything related to the issue I am facing.

Thank you for reading : )

This may or may not fix it, but put the SurfaceGUI inside of StarterGui and set its Adrornee property to the part you want it on in the workspace

1 Like

Woahhhhh that’s cool, I got confused at first and thought it was typo but I found it and did it like you said, that’s so cool. Thanks : ))

1 Like

Woahhhhh that’s cool, I got confused at first and thought it was typo but I found it and did it like you said, that’s so cool. I have no idea thats a thing, Thanks : ))

Yw lol, SurfaceGuis are a little silly lol

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.