#tweenpositioning

31 messages · Page 1 of 1 (latest)

solemn hemlock
#

as a gui designer seeing a number such as "8.41" in the scale segment of a udim2 aggravates me

#

but can you send the entire script

#

with bar defined (and cam preferably)

#

and an explorer structure of you screengui

twin tendon
#

the elseif doesnt look necessary

#

you can just use else

#

and the code is not ina prettier version yk what i mean?

#

but that doesnt matter to much

#

try this:

local debounce = false

button.MouseButton1Click:connect(function()
    if debounce == false then
        debounce = true
        bar:TweenPosition(UDim2.new(0.5, -100, 1, -50), "In", "Linear", 1, true)
        pcall(function()
            title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
        end)
    else
        debounce = false
        pcall(function()
            cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
        end)
        bar:TweenPosition(UDim2.new(0.5, -100, 1, -50), "Out", "Linear", 1, true)
    end
end)

gaunt stone
#

just imagine it coming from the bottom middle, and rising up a little bit

#

thats what i was tryna do

solemn hemlock
gaunt stone
#
local debounce = false -- {6.94, -100},{2.34, -50}
button.MouseButton1Click:connect(function()
    if debounce == false then debounce = true
        bar:TweenPosition(UDim2.new(8.41,-100,3.5,-50),"In","Linear",1,true) -- {8.33, -100},{2.08, -50}
        pcall(function()
                title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
        end)
    elseif debounce == true then debounce = false
        pcall(function() cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid end)
        bar:TweenPosition(UDim2.new(8.32,-100,3.4,-50),"Out","Linear",1,true)
        end
end)

prev.MouseButton1Click:connect(function()
    wait(.1)
    local players = game.Players:GetPlayers()
    local num = get()
    if not pcall(function() 
        cam.CameraSubject = players[num-1].Character.Humanoid
        end) then
        cam.CameraSubject = players[#players].Character.Humanoid
    end
pcall(function()
                title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
        end)
end)

nex.MouseButton1Click:connect(function()
    wait(.1)
    local players = game.Players:GetPlayers()
    local num = get()
    if not pcall(function() 
        cam.CameraSubject = players[num+1].Character.Humanoid
        end) then
        cam.CameraSubject = players[1].Character.Humanoid
    end
pcall(function()
                title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
        end)
end)```
solemn hemlock
gaunt stone
solemn hemlock
gaunt stone
#

cam = game.Workspace.CurrentCamera

local bar = script.Parent.Bar

solemn hemlock
#

alright

#

have you tried debugging it to see where it goes wrong

fossil apexBOT
#

studio** You are now Level 4! **studio

gaunt stone
#

i'm not necessarily trying to solve the problem cuz it seemed to be worrking, but i just couldnt figure out how to get it in the position i want it to be in

#

properly*

solemn hemlock
#

ohhhh

#

i see

#

you can just put the bar on the bottom of the screen, copy the position of the bar

#

and do the same for the top

gaunt stone
#

wyhere do i even put the positions i want it to start adn end in

solemn hemlock
#

udim2