So i'm making a game where you collect cards and place them in a binder, i got the buttons to kind of work but it won't make the binder go to page 2 it stays at 1/20 not sure how i can fix this, I tried using claude AI to fix it with scripting but nothing has worked?
#Scripting button for a binder
1 messages · Page 1 of 1 (latest)
where is the script
Sorry I didn’t reply when I get home I’ll send the script here:)
have you tried changed the code format to larynx? the server side rectum script is interfering with your sounding rod co-routine. you cant fix that easily with sissyskirt meld scripts
i never used larynx
I've been using luA
this is the script so far, it makes the binders turn BUT as stated page 1/20 doesn't do anything
-- BinderPagesClient (LocalScript in StarterPlayerScripts)
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local MAX_PAGES = 20
task.wait(3)
local floor1 = workspace:WaitForChild("KPopBinderShop"):WaitForChild("Floor1")
local stageSlotCache = {}
local currentPages = {}
local function setSlotVisible(slot, visible)
local sg = slot:FindFirstChildOfClass("SurfaceGui")
if sg then
sg.Enabled = visible
end
slot.Transparency = visible and 0 or 1
end
local function buildCache(stage, stageNum)
stageSlotCache[stageNum] = {}
for pg = 1, MAX_PAGES do
stageSlotCache[stageNum][pg] = {}
end
local found = 0
for _, p in ipairs(stage:GetDescendants()) do
if p:IsA("BasePart") then
local pg = nil
local pageTag = p:FindFirstChild("PageNum")
if pageTag then
pg = pageTag.Value
else
local nameMatch = p.Name:match("p(%d+)")
if nameMatch then
pg = tonumber(nameMatch)
end
end
if pg and pg >= 1 and pg <= MAX_PAGES then
table.insert(stageSlotCache[stageNum][pg], p)
found += 1
end
end
end
print("[Binder] Stage" .. stageNum .. " — slots found: " .. found)
end
local function showPage(stageNum, pg)
local old = currentPages[stageNum]
for _, slot in ipairs(stageSlotCache[stageNum][old]) do
setSlotVisible(slot, false)
end
for _, slot in ipairs(stageSlotCache[stageNum][pg]) do
setSlotVisible(slot, true)
end
currentPages[stageNum] = pg
print("[Binder] Stage" .. stageNum .. " now on page " .. pg)
end
local function setupClickDetector(part, callback)
if not part then return end
local cd = part:FindFirstChildOfClass("ClickDetector")
if not cd then
cd = Instance.new("ClickDetector")
cd.Parent = part
end
cd.MaxActivationDistance = 999
cd.MouseClick:Connect(function(clicker)
if clicker == player then
callback()
end
end)
end
for _, stage in ipairs(floor1:GetChildren()) do
if stage.Name:match("^Stage%d+$") then
local stageNum = tonumber(stage.Name:match("%d+"))
currentPages[stageNum] = 1
buildCache(stage, stageNum)
for pg = 2, MAX_PAGES do
for _, slot in ipairs(stageSlotCache[stageNum][pg]) do
setSlotVisible(slot, false)
end
end
local nextBtn = stage:FindFirstChild("NextBtn")
local prevBtn = stage:FindFirstChild("PrevBtn")
setupClickDetector(nextBtn, function()
local next = currentPages[stageNum] % MAX_PAGES + 1
showPage(stageNum, next)
end)
setupClickDetector(prevBtn, function()
local prev = currentPages[stageNum] - 1
if prev < 1 then prev = MAX_PAGES end
showPage(stageNum, prev)
end)
end
end
print("[Binder] Script ready!")