Wanna get my gui panel to teleport you to either a shop or a selling spot by firing an event with tele’s value.
Gui Script:
local function CDetect(Button) for _,v in pairs(packFull:GetChildren()) do if v:IsA("Frame") then if Button and not inTween then Button.MouseButton1Click:Connect(function() packFull.Position = UDim2.new(0.5, 0, -0.5, 0) packFull.Visible = false print(Button.Name) if Button.Name == "Sell" then tele = "Sell" elseif Button.Name == "Upgrade" then tele = "Upgrade" end end) end end end end PF.OnClientEvent:Connect(function(player) packFull.Visible = true inTween = true local Button -- Activate/Deactive Buttons -- local function Activate() for i,v in pairs (packFull:GetChildren()) do if v:IsA("Frame") then Button = v:FindFirstChildWhichIsA("GuiButton") Button.Active = not Button.Active end end end Activate() packFull:TweenPosition(UDim2.new(0.5, 0, 0.5, 0)) wait(2) Activate() inTween = false CDetect(Button) end)
Problem is neither buttons are registering clicks which means tele’s value isn’t getting set and the player is going no where. Any ideas why this is happening?