I don't know why that happens but here is the script to the Gui.

local black = script.Parent.Parent
local title = script.Parent
local joingame = script.Parent.Parent.TextButton
local whitestripe = script.Parent.Parent.stripe
local music = workspace.horror
local laugh = workspace.roar
local Player = game.Players.LocalPlayer
local spawnn = workspace.spann
local bmenu = script.Parent.Parent.backgroundmenu
local StarterGui = game:GetService('StarterGui')

music:play()
bmenu.Visible = true --settings first time play
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All , false)

    for i = 0,1,0.1 do
    black.BackgroundTransparency = i
    wait(0.1)
end
    if black.BackgroundTransparency == 1 then
    script.Parent:TweenPosition (UDim2.new(0.5, -100, 0.1, -25), "Out", "Quad", 1, true)
    joingame.Visible = true
    whitestripe.Visible = true
    title.Visible = true
    joingame.TextColor3 = Color3.new(0,0,0)
    title.TextColor3 = Color3.new(0,0,0)
end
 
function onClicked()
music:stop()
wait(0.1)
	
title.Visible = false
joingame.Visible = false
whitestripe.Visible = false
laugh:play()
    for i = 1,0,-0.01 do
        black.BackgroundTransparency = i
        wait (0.01)
    end
wait(10)
bmenu.Visible = false
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All , true)
Player.Character:MoveTo(spawnn.Position)
    wait(1)
    for i = 0,1,0.1 do
        black.BackgroundTransparency = i
        wait(0.1)
    end
end

script.Parent.Parent.TextButton.MouseButton1Down:connect(onClicked)

Thank you

1 comment

0

Is this a normal script or a local script?