local player = game.Players.LocalPlayer
local teams = game:GetService("Teams")
local camera = game.Workspace.CurrentCamera
workspace:WaitForChild("MenuCamera")
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = game.Workspace.MenuCamera.CFrame
wait(0.1)
--game.Workspace.MenuCamera.Sound.Playing = true
game.Workspace.MenuCamera.MerryChristmas.Playing = true
game.Workspace.MenuCamera.ChristmasTheme.Playing = true
-- Get the TextButton
local textButton = script.Parent -- assuming the script is a child of the TextButton
local originalText = textButton.Text
local hoverText = "> PLAY <"
local click = script.Parent.Parent.Parent.Parent.click
local current = game.Players.LocalPlayer.PlayerGui:WaitForChild("BackMain")
local currentframe = current.TextButton
local function onMouseEnter()
click:Play()
textButton.Text = hoverText
end
local function onMouseLeave()
textButton.Text = originalText
end
textButton.MouseEnter:Connect(onMouseEnter)
textButton.MouseLeave:Connect(onMouseLeave)
script.Parent.MouseButton1Click:Connect(function()
if player.Team == teams.lobby then
print("if statement 1 used")
script.Parent.Parent.warning.TextTransparency = 0
wait(5)
script.Parent.Parent.warning.TextTransparency = 1
else
print("if statement 2 used")
camera.CameraType = Enum.CameraType.Custom
print("change cam")
camera.CameraSubject = player.Character.Humanoid
print("fixed cam")
currentframe.Visible = true
print("showed button")
script.Parent.Parent.Parent.Parent.Container.Visible = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
-- game.Workspace.Music.Enabled = true
end
end)
so basically when the player clicks “play” the other GUI is supposed to appear.
yeah so what actually gets printed is the “if statement 1/2 used” “change cam” “fixed cam” “showed button” etc.
what IM thinking is because this is in a local script there’s something weird going on with the local current = game.Players.LocalPlayer.PlayerGui:WaitForChild("BackMain")
its not disabled though, im very sure. the only disabled properties on the UIs are “visible” which needs to be enabled - the enabling part on the client side isnt working