I am currently making a 2D obby game and when the user dies I don't want the starter GUI to reappear (which it is currently doing). Currently the StartingScreen (name of GUI) and its localscript is located in startergui (If this needs to be moved tell me!). If there is anyway of doing this that would be great.
LocalScript:
repeat wait() until game.Players.LocalPlayer.Character
local character = game.Players.LocalPlayer.Character
Start = script.Parent.StartButton
CourseSelect = script.Parent.CourseSelect
angle = 0
go = 0
CourseSelect.Visible = false
Num = 0
Course1 = script.Parent.CourseSelect.Course1
Course2 = script.Parent.CourseSelect.Course2
Course3 = script.Parent.CourseSelect.Course3
Course1.Visible = false
Course2.Visible = false
Course3.Visible = false
-- Size X 400, Size Y 300
print("Started = false")
function ClickedStart()
CourseSelect.Visible = true
Start.Visible = false
for GuiSize = 1, 45 do
if GuiSize <= 45 then
CourseSelect.Size = CourseSelect.Size +UDim2.new(0.01, 0, 0.015, 0)
Num = Num +1
print(Num)
end
wait()
end
Course1.Visible = true
wait(1)
Course2.Visible = true
wait(1)
Course3.Visible = true
end
function ClickedCourse1()
Course1.Visible = false
Course2.Visible = false
Course3.Visible = false
CourseSelect.Visible = false
character:MoveTo(game.Workspace.Course1Tele.Position + Vector3.new(0,3,0))
end
Course1.MouseButton1Down:connect(ClickedCourse1)
Start.MouseButton1Down:connect(ClickedStart)
