Im trying to make it so if you press a button (SkipCutscene), it enables a frame with a team selecting button.
I made this script which works when i put it in the TeamGui folder
local tgui = script.Parent.Parent.Parent:WaitForChild("TeamGui") local toggle = tgui:WaitForChild("Toggle") script.Parent.MouseButton1Click:Connect(function(player) toggle.Visible = true end)
This script works just fine when put in one of the "TeamGui" buttons, but when i put it into the "Cutscene" GUI it just doesn't work.
https://gyazo.com/45b6ba5017a73e526f6edca7ccd92873
Is there a way to enable the frame called "Toggle" (in the TeamGui) by clicking the "SkipCutscene" button in the "Cutscene" GUI?
Okay i figured it out. I used a cutscene plugin, so the Skip button is controlled by a completely different script in the StarterPlayerScripts folder. I went into the main script and located the TeamGui and the button i wanted to make visible;
local toggle = game:GetService("Players").LocalPlayer:WaitForChild('PlayerGui'):WaitForChild("TeamGui"):WaitForChild("Toggle")
Then there was a line that actually controlled the skip button so i added the "toggle.Visible = true"
if SkipCutsceneButton and SkipCutsceneButton:IsA("GuiButton") then SkipCutsceneButton.MouseButton1Click:Connect(function() toggle.Visible = true Demo:Stop() end) end