I have a tool where if you have it equipped a gui shows, but the gui buttons dont work?
Asked by
5 years ago Edited 5 years ago
So before I changed the first line of the first script the gui buttons worked, but the gui itself wouldn't show up in a clone of the tool, only the first one. Now the gui shows everytime, but the buttons don't work. This was the first line before I changed it
1 | Picture = game.Workspace.Makeabook.Picture |
Heres the script for the tool
01 | local Picture = game.Workspace.Makeabook.Picture:Clone() |
03 | function onEquippedLocal(mouse) |
04 | Player = game.Players.LocalPlayer |
05 | Picture.Parent = Player.PlayerGui |
10 | Picture.Parent = script.Parent |
13 | script.Parent.Equipped:Connect(onEquippedLocal) |
14 | script.Parent.Unequipped:Connect(onUnS) |
and here's the code for one of the gui buttons
01 | local Base = script.Parent.Parent.Parent |
02 | local Button = script.Parent |
03 | local MyPage = Button.Parent |
04 | local ShowPage 1 = MyPage.Parent:findFirstChild( "Page1" ) |
05 | local ShowPage 2 = MyPage.Parent:findFirstChild( "Page2" ) |
08 | MyPage.Visible = false |
09 | ShowPage 1. Visible = true |
10 | ShowPage 2. Visible = true |
13 | Button.MouseButton 1 Click:connect(temp) |