#wha ru i do?

1 messages · Page 1 of 1 (latest)

copper vapor
#

also im going to sleep i wont answer immediately

outer falcon
#
local frame = script.Parent :: Frame

local left_button = frame:WaitForChild("Left") :: TextButton
local right_button = frame:WaitForChild("Right") :: TextButton

local current_page = 1

local function update_frame(value)
    if not frame:FindFirstChild(current_page+value) then return end
    current_page += value
    for _,v in pairs(frame:GetChildren()) do
        if v:IsA("Frame") then
            if v.Name == tostring(current_page) then
                v.Visible = true
            else
                v.Visible = false
            end
        end
    end
    
end

left_button.Activated:Connect(function()
    update_frame(-1)
end)

right_button.Activated:Connect(function()
    update_frame(1)
end)

this code are better to handle the gui, make localscript in Frame.

copper vapor
#

wait no how does it stop me from getting the value all the way to 0 or negatives numbers, is there even a cap, @outer falcon ?

outer falcon
jovial forgeBOT
#

studio** You are now Level 3! **studio