-
Basicly I want to achieve smooth page movement within this ui
This is the 4th different iteration of code I have tried and now I am kind of assuming I am making a stupid mistake
-- Variables
local ForwardButton = script.Parent:WaitForChild("Forward_Button")
local BackwardButton = script.Parent:WaitForChild("Back_Button")
local TweenService = game:GetService("TweenService")
local MainGui = game.StarterGui.MainGui
local UpgradeFrame = MainGui.Upgrade_Frame
local Page1 = UpgradeFrame:WaitForChild("Page1")
local Page2 = UpgradeFrame:WaitForChild("Page2")
local Page3 = UpgradeFrame:WaitForChild("Page3")
local function PageChanger_1()
Page1.Visible = false
Page2.Visible = true
end
local function PageChanger_2()
Page2.Visible = false
Page3.Visible = true
end
local function PageChanger_3()
ForwardButton.ImageColor3 = Color3.new(154,154,154)
end
-- Forward Button
ForwardButton.Activated:Connect(function()
if Page1.Visible == true then
PageChanger_1()
elseif Page2.Visible == true then
PageChanger_2()
elseif Page3.Visible == true then
PageChanger_3()
end
end)
I have looked through the developer hub, this page and I could not find anything to discern this problem, like I said this is my 4th iteration of this code