From 1bb038816b1939de4ddcd466c0db4c135abd5f13 Mon Sep 17 00:00:00 2001 From: listik Date: Mon, 2 Nov 2026 23:30:13 +0300 Subject: [PATCH] 12 --- Fishing.rbxlx | 178 +++++++++++++++--- ...5_FishingClient_StarterPlayerScripts.rbxmx | 178 +++++++++++++++--- install/INSTALL.lua | 178 +++++++++++++++--- .../FishingClient.client.lua | 178 +++++++++++++++--- 4 files changed, 628 insertions(+), 84 deletions(-) diff --git a/Fishing.rbxlx b/Fishing.rbxlx index 9ec5d84..58849a9 100644 --- a/Fishing.rbxlx +++ b/Fishing.rbxlx @@ -4052,9 +4052,40 @@ local function sideButton(order, icon, label, key, color, onClick) end ---------------------------------------------------------------- уведомления +-- мультяшный стиль подсказок: крупный круглый шрифт без обводки на мягкой «дымке» — +-- тёмная подложка, которая плавно растворяется к краям; появляются «пружинкой» +local SOFT_EDGES = NumberSequence.new({ + NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.18, 0.62), + NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), +}) +-- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует +local function softPlate(props, textProps) + local plate = new("Frame", props) + plate.BackgroundColor3 = BLACK + plate.BackgroundTransparency = 0 + corner(30).Parent = plate + new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) + new("UIPadding", { PaddingLeft = UDim.new(0, 48), PaddingRight = UDim.new(0, 48), Parent = plate }) + local d = { Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextXAlignment = Enum.TextXAlignment.Center, Parent = plate } + for k, v in pairs(textProps) do + d[k] = v + end + return plate, text(d) +end +local function popIn(obj, from) + local sc = obj:FindFirstChildOfClass("UIScale") or new("UIScale", { Parent = obj }) + sc.Scale = from or 0.4 + TweenService:Create(sc, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 }):Play() +end +local function wobble(obj, deg, period) + obj.Rotation = -deg + TweenService:Create(obj, TweenInfo.new(period, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true), { Rotation = deg }):Play() +end + +-- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { - Size = UDim2.new(0, 560, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 8), + Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), BackgroundTransparency = 1, Parent = gui, }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 @@ -4084,11 +4115,11 @@ local function notify(msg, color) if #items >= 3 then items[1]:Destroy() end - local t = new("Frame", { - Size = UDim2.new(0, 0, 0, 38), AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = C.bg, - BackgroundTransparency = 0.15, LayoutOrder = toastOrder, Parent = toasts, - }, { corner(12), stroke(color or WHITE, 2, 0.2), new("UIPadding", { PaddingLeft = UDim.new(0, 16), PaddingRight = UDim.new(0, 16) }) }) - local l = text({ Size = UDim2.new(0, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextSize = 19, TextColor3 = color or WHITE, Text = msg, Parent = t }) + local t, l = softPlate( + { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 30, TextColor3 = color or WHITE, Text = msg } + ) + popIn(t) t:SetAttribute("Msg", msg) toastTimers[t] = 0 task.delay(3.2, function() @@ -4161,11 +4192,12 @@ end ---------------------------------------------------------------- статус и мини-игра -local statusLabel = text({ - Size = UDim2.fromOffset(460, 34), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), - Font = TITLE, TextSize = 22, TextXAlignment = Enum.TextXAlignment.Center, TextStrokeTransparency = 0.3, - Text = "🎣 Ждём поклёвку… (клик — смотать)", Visible = false, Parent = gui, -}) +-- вверху, на месте подсказки обучения (она во время рыбалки скрыта) +local statusLabel = softPlate( + { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, + { TextSize = 36, Text = "🎣 Ждём поклёвку… (клик — смотать)" } +) +wobble(statusLabel, 1.2, 1.4) local mgFrame = new("Frame", { Size = UDim2.fromOffset(480, 124), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -100), BackgroundColor3 = WHITE, Visible = false, Parent = gui, @@ -5387,13 +5419,13 @@ local GUIDE_N, GUIDE_GAP, GUIDE_SPEED = 32, 3, 7 -- сколько стрело local W1 = Config.Worlds[1].center local guideStep = 0 -- шаг, отправленный на сервер (атрибут Tutorial может прийти чуть позже) -local guideHint = text({ - Size = UDim2.fromOffset(560, 42), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 64), - BackgroundTransparency = 0.2, BackgroundColor3 = C.bg, Font = TITLE, TextSize = 20, - TextXAlignment = Enum.TextXAlignment.Center, Visible = false, Parent = gui, -}, nil) -corner(12).Parent = guideHint -stroke(C.gold, 2).Parent = guideHint +-- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» +local guideHint, guideHintText = softPlate( + { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, + { TextSize = 42, Text = "" } +) +wobble(guideHint, 1.2, 1.6) +local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) local chevrons = {} @@ -5475,6 +5507,94 @@ local function guideObject(key) return nil end +-- первый подход к табличке: камера крупно на табличку, управление и весь интерфейс убраны; +-- кнопка «Далее» плавно возвращает камеру, интерфейс и управление +local StarterGui = game:GetService("StarterGui") +local BOARD_CAM_TIME, BOARD_FOV = 0.8, 70 +local boardView = nil +local closeBoardView +-- кнопка в отдельном ScreenGui: основной интерфейс на это время выключается целиком +local boardGui = new("ScreenGui", { Name = "BoardView", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 50, Enabled = false, Parent = player:WaitForChild("PlayerGui") }) +btn({ + Size = UDim2.fromOffset(240, 60), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -40), + BackgroundColor3 = C.green, Text = "Далее ▶", TextSize = 26, Parent = boardGui, +}, function() + closeBoardView() +end) + +local function setInterfaceHidden(hidden) + gui.Enabled = not hidden + boardGui.Enabled = hidden + pcall(function() + StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden) + end) + -- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было + if hidden then + boardView.billboards = {} + local map = workspace:FindFirstChild("FishingMap") + for _, d in ipairs(map and map:GetDescendants() or {}) do + if d:IsA("BillboardGui") and d.Enabled then + d.Enabled = false + table.insert(boardView.billboards, d) + end + end + elseif boardView and boardView.billboards then + for _, d in ipairs(boardView.billboards) do + d.Enabled = true + end + boardView.billboards = nil + end +end + +local function boardCamStep() + local bv, cam = boardView, workspace.CurrentCamera + if not bv or not cam then + return + end + local e = easeInOut(math.min(1, (os.clock() - bv.t0) / BOARD_CAM_TIME)) + cam.CFrame = bv.fromCF:Lerp(bv.toCF, e) + cam.FieldOfView = bv.fromFov + (bv.toFov - bv.fromFov) * e + if bv.returning and e >= 1 then + RunService:UnbindFromRenderStep("BoardCam") + cam.CameraType = Enum.CameraType.Custom + setInterfaceHidden(false) + boardView = nil + setMovementLocked(false) + end +end + +local function openBoardView(board) + local cam = workspace.CurrentCamera + -- отходим ровно настолько, чтобы табличка целиком влезла в кадр (по высоте и по ширине) с небольшим запасом + local half = math.tan(math.rad(BOARD_FOV / 2)) + local aspect = cam.ViewportSize.X / math.max(1, cam.ViewportSize.Y) + local dist = math.max((board.Size.Y / 2) / half, (board.Size.X / 2) / (half * aspect)) * 1.15 + boardView = { + t0 = os.clock(), origCF = cam.CFrame, origFov = cam.FieldOfView, + fromCF = cam.CFrame, fromFov = cam.FieldOfView, + -- надписи на лицевой стороне (Front), она смотрит по LookVector + toCF = CFrame.lookAt(board.Position + board.CFrame.LookVector * dist, board.Position), toFov = BOARD_FOV, + } + setMovementLocked(true) + setInterfaceHidden(true) + cam.CameraType = Enum.CameraType.Scriptable + RunService:UnbindFromRenderStep("BoardCam") + RunService:BindToRenderStep("BoardCam", Enum.RenderPriority.Camera.Value + 1, boardCamStep) +end + +closeBoardView = function() + local cam = workspace.CurrentCamera + if not boardView or boardView.returning or not cam then + return + end + boardGui.Enabled = false -- кнопка пропадает сразу, остальной интерфейс — когда камера вернётся + boardView.returning = true + boardView.t0 = os.clock() + boardView.fromCF, boardView.fromFov = cam.CFrame, cam.FieldOfView + boardView.toCF, boardView.toFov = boardView.origCF, boardView.origFov + advanceTutorial(1) +end + -- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем local function guideRoute(step, pos, world) local inW1 = world and world.id == "World1" @@ -5506,6 +5626,12 @@ RunService.RenderStepped:Connect(function() hideChevrons(1) return end + if boardView then -- смотрим на табличку: ни линии, ни подсказок + guideHint.Visible = false + guideHighlight.Enabled = false + hideChevrons(1) + return + end local pos = hrp.Position local world = Config.WorldAt(pos) @@ -5514,7 +5640,12 @@ RunService.RenderStepped:Connect(function() advanceTutorial(2) elseif step == 0 then local board = guideMarker("GuideBoard") - if board and (board - pos).Magnitude < 9 then + if board and (board - pos).Magnitude < 9 and state == "idle" then + local obj = guideObject("Board") + if obj then + openBoardView(obj) -- шаг засчитается по кнопке «Далее» + return + end advanceTutorial(1) end elseif step == 2 and (player:GetAttribute("TotalCaught") or 0) > 0 then @@ -5523,8 +5654,13 @@ RunService.RenderStepped:Connect(function() step = tutorialStep() local route, hint, key = guideRoute(step, pos, world) - guideHint.Text = hint or "" - guideHint.Visible = hint ~= nil and state == "idle" + guideHintText.Text = hint or "" + local showHint = hint ~= nil and state == "idle" + if showHint and (hint ~= lastHint or not guideHint.Visible) then + popIn(guideHint, 0.5) + end + lastHint = hint + guideHint.Visible = showHint local target = (key and state == "idle") and guideObject(key) or nil guideHighlight.Adornee = target or nil guideHighlight.Enabled = target ~= nil diff --git a/install/5_FishingClient_StarterPlayerScripts.rbxmx b/install/5_FishingClient_StarterPlayerScripts.rbxmx index 08237ae..4139fc1 100644 --- a/install/5_FishingClient_StarterPlayerScripts.rbxmx +++ b/install/5_FishingClient_StarterPlayerScripts.rbxmx @@ -219,9 +219,40 @@ local function sideButton(order, icon, label, key, color, onClick) end ---------------------------------------------------------------- уведомления +-- мультяшный стиль подсказок: крупный круглый шрифт без обводки на мягкой «дымке» — +-- тёмная подложка, которая плавно растворяется к краям; появляются «пружинкой» +local SOFT_EDGES = NumberSequence.new({ + NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.18, 0.62), + NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), +}) +-- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует +local function softPlate(props, textProps) + local plate = new("Frame", props) + plate.BackgroundColor3 = BLACK + plate.BackgroundTransparency = 0 + corner(30).Parent = plate + new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) + new("UIPadding", { PaddingLeft = UDim.new(0, 48), PaddingRight = UDim.new(0, 48), Parent = plate }) + local d = { Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextXAlignment = Enum.TextXAlignment.Center, Parent = plate } + for k, v in pairs(textProps) do + d[k] = v + end + return plate, text(d) +end +local function popIn(obj, from) + local sc = obj:FindFirstChildOfClass("UIScale") or new("UIScale", { Parent = obj }) + sc.Scale = from or 0.4 + TweenService:Create(sc, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 }):Play() +end +local function wobble(obj, deg, period) + obj.Rotation = -deg + TweenService:Create(obj, TweenInfo.new(period, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true), { Rotation = deg }):Play() +end + +-- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { - Size = UDim2.new(0, 560, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 8), + Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), BackgroundTransparency = 1, Parent = gui, }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 @@ -251,11 +282,11 @@ local function notify(msg, color) if #items >= 3 then items[1]:Destroy() end - local t = new("Frame", { - Size = UDim2.new(0, 0, 0, 38), AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = C.bg, - BackgroundTransparency = 0.15, LayoutOrder = toastOrder, Parent = toasts, - }, { corner(12), stroke(color or WHITE, 2, 0.2), new("UIPadding", { PaddingLeft = UDim.new(0, 16), PaddingRight = UDim.new(0, 16) }) }) - local l = text({ Size = UDim2.new(0, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextSize = 19, TextColor3 = color or WHITE, Text = msg, Parent = t }) + local t, l = softPlate( + { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 30, TextColor3 = color or WHITE, Text = msg } + ) + popIn(t) t:SetAttribute("Msg", msg) toastTimers[t] = 0 task.delay(3.2, function() @@ -328,11 +359,12 @@ end ---------------------------------------------------------------- статус и мини-игра -local statusLabel = text({ - Size = UDim2.fromOffset(460, 34), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), - Font = TITLE, TextSize = 22, TextXAlignment = Enum.TextXAlignment.Center, TextStrokeTransparency = 0.3, - Text = "🎣 Ждём поклёвку… (клик — смотать)", Visible = false, Parent = gui, -}) +-- вверху, на месте подсказки обучения (она во время рыбалки скрыта) +local statusLabel = softPlate( + { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, + { TextSize = 36, Text = "🎣 Ждём поклёвку… (клик — смотать)" } +) +wobble(statusLabel, 1.2, 1.4) local mgFrame = new("Frame", { Size = UDim2.fromOffset(480, 124), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -100), BackgroundColor3 = WHITE, Visible = false, Parent = gui, @@ -1554,13 +1586,13 @@ local GUIDE_N, GUIDE_GAP, GUIDE_SPEED = 32, 3, 7 -- сколько стрело local W1 = Config.Worlds[1].center local guideStep = 0 -- шаг, отправленный на сервер (атрибут Tutorial может прийти чуть позже) -local guideHint = text({ - Size = UDim2.fromOffset(560, 42), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 64), - BackgroundTransparency = 0.2, BackgroundColor3 = C.bg, Font = TITLE, TextSize = 20, - TextXAlignment = Enum.TextXAlignment.Center, Visible = false, Parent = gui, -}, nil) -corner(12).Parent = guideHint -stroke(C.gold, 2).Parent = guideHint +-- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» +local guideHint, guideHintText = softPlate( + { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, + { TextSize = 42, Text = "" } +) +wobble(guideHint, 1.2, 1.6) +local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) local chevrons = {} @@ -1642,6 +1674,94 @@ local function guideObject(key) return nil end +-- первый подход к табличке: камера крупно на табличку, управление и весь интерфейс убраны; +-- кнопка «Далее» плавно возвращает камеру, интерфейс и управление +local StarterGui = game:GetService("StarterGui") +local BOARD_CAM_TIME, BOARD_FOV = 0.8, 70 +local boardView = nil +local closeBoardView +-- кнопка в отдельном ScreenGui: основной интерфейс на это время выключается целиком +local boardGui = new("ScreenGui", { Name = "BoardView", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 50, Enabled = false, Parent = player:WaitForChild("PlayerGui") }) +btn({ + Size = UDim2.fromOffset(240, 60), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -40), + BackgroundColor3 = C.green, Text = "Далее ▶", TextSize = 26, Parent = boardGui, +}, function() + closeBoardView() +end) + +local function setInterfaceHidden(hidden) + gui.Enabled = not hidden + boardGui.Enabled = hidden + pcall(function() + StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden) + end) + -- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было + if hidden then + boardView.billboards = {} + local map = workspace:FindFirstChild("FishingMap") + for _, d in ipairs(map and map:GetDescendants() or {}) do + if d:IsA("BillboardGui") and d.Enabled then + d.Enabled = false + table.insert(boardView.billboards, d) + end + end + elseif boardView and boardView.billboards then + for _, d in ipairs(boardView.billboards) do + d.Enabled = true + end + boardView.billboards = nil + end +end + +local function boardCamStep() + local bv, cam = boardView, workspace.CurrentCamera + if not bv or not cam then + return + end + local e = easeInOut(math.min(1, (os.clock() - bv.t0) / BOARD_CAM_TIME)) + cam.CFrame = bv.fromCF:Lerp(bv.toCF, e) + cam.FieldOfView = bv.fromFov + (bv.toFov - bv.fromFov) * e + if bv.returning and e >= 1 then + RunService:UnbindFromRenderStep("BoardCam") + cam.CameraType = Enum.CameraType.Custom + setInterfaceHidden(false) + boardView = nil + setMovementLocked(false) + end +end + +local function openBoardView(board) + local cam = workspace.CurrentCamera + -- отходим ровно настолько, чтобы табличка целиком влезла в кадр (по высоте и по ширине) с небольшим запасом + local half = math.tan(math.rad(BOARD_FOV / 2)) + local aspect = cam.ViewportSize.X / math.max(1, cam.ViewportSize.Y) + local dist = math.max((board.Size.Y / 2) / half, (board.Size.X / 2) / (half * aspect)) * 1.15 + boardView = { + t0 = os.clock(), origCF = cam.CFrame, origFov = cam.FieldOfView, + fromCF = cam.CFrame, fromFov = cam.FieldOfView, + -- надписи на лицевой стороне (Front), она смотрит по LookVector + toCF = CFrame.lookAt(board.Position + board.CFrame.LookVector * dist, board.Position), toFov = BOARD_FOV, + } + setMovementLocked(true) + setInterfaceHidden(true) + cam.CameraType = Enum.CameraType.Scriptable + RunService:UnbindFromRenderStep("BoardCam") + RunService:BindToRenderStep("BoardCam", Enum.RenderPriority.Camera.Value + 1, boardCamStep) +end + +closeBoardView = function() + local cam = workspace.CurrentCamera + if not boardView or boardView.returning or not cam then + return + end + boardGui.Enabled = false -- кнопка пропадает сразу, остальной интерфейс — когда камера вернётся + boardView.returning = true + boardView.t0 = os.clock() + boardView.fromCF, boardView.fromFov = cam.CFrame, cam.FieldOfView + boardView.toCF, boardView.toFov = boardView.origCF, boardView.origFov + advanceTutorial(1) +end + -- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем local function guideRoute(step, pos, world) local inW1 = world and world.id == "World1" @@ -1673,6 +1793,12 @@ RunService.RenderStepped:Connect(function() hideChevrons(1) return end + if boardView then -- смотрим на табличку: ни линии, ни подсказок + guideHint.Visible = false + guideHighlight.Enabled = false + hideChevrons(1) + return + end local pos = hrp.Position local world = Config.WorldAt(pos) @@ -1681,7 +1807,12 @@ RunService.RenderStepped:Connect(function() advanceTutorial(2) elseif step == 0 then local board = guideMarker("GuideBoard") - if board and (board - pos).Magnitude < 9 then + if board and (board - pos).Magnitude < 9 and state == "idle" then + local obj = guideObject("Board") + if obj then + openBoardView(obj) -- шаг засчитается по кнопке «Далее» + return + end advanceTutorial(1) end elseif step == 2 and (player:GetAttribute("TotalCaught") or 0) > 0 then @@ -1690,8 +1821,13 @@ RunService.RenderStepped:Connect(function() step = tutorialStep() local route, hint, key = guideRoute(step, pos, world) - guideHint.Text = hint or "" - guideHint.Visible = hint ~= nil and state == "idle" + guideHintText.Text = hint or "" + local showHint = hint ~= nil and state == "idle" + if showHint and (hint ~= lastHint or not guideHint.Visible) then + popIn(guideHint, 0.5) + end + lastHint = hint + guideHint.Visible = showHint local target = (key and state == "idle") and guideObject(key) or nil guideHighlight.Adornee = target or nil guideHighlight.Enabled = target ~= nil diff --git a/install/INSTALL.lua b/install/INSTALL.lua index 0c013b3..8a02d00 100644 --- a/install/INSTALL.lua +++ b/install/INSTALL.lua @@ -4055,9 +4055,40 @@ local function sideButton(order, icon, label, key, color, onClick) end ---------------------------------------------------------------- уведомления +-- мультяшный стиль подсказок: крупный круглый шрифт без обводки на мягкой «дымке» — +-- тёмная подложка, которая плавно растворяется к краям; появляются «пружинкой» +local SOFT_EDGES = NumberSequence.new({ + NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.18, 0.62), + NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), +}) +-- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует +local function softPlate(props, textProps) + local plate = new("Frame", props) + plate.BackgroundColor3 = BLACK + plate.BackgroundTransparency = 0 + corner(30).Parent = plate + new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) + new("UIPadding", { PaddingLeft = UDim.new(0, 48), PaddingRight = UDim.new(0, 48), Parent = plate }) + local d = { Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextXAlignment = Enum.TextXAlignment.Center, Parent = plate } + for k, v in pairs(textProps) do + d[k] = v + end + return plate, text(d) +end +local function popIn(obj, from) + local sc = obj:FindFirstChildOfClass("UIScale") or new("UIScale", { Parent = obj }) + sc.Scale = from or 0.4 + TweenService:Create(sc, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 }):Play() +end +local function wobble(obj, deg, period) + obj.Rotation = -deg + TweenService:Create(obj, TweenInfo.new(period, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true), { Rotation = deg }):Play() +end + +-- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { - Size = UDim2.new(0, 560, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 8), + Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), BackgroundTransparency = 1, Parent = gui, }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 @@ -4087,11 +4118,11 @@ local function notify(msg, color) if #items >= 3 then items[1]:Destroy() end - local t = new("Frame", { - Size = UDim2.new(0, 0, 0, 38), AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = C.bg, - BackgroundTransparency = 0.15, LayoutOrder = toastOrder, Parent = toasts, - }, { corner(12), stroke(color or WHITE, 2, 0.2), new("UIPadding", { PaddingLeft = UDim.new(0, 16), PaddingRight = UDim.new(0, 16) }) }) - local l = text({ Size = UDim2.new(0, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextSize = 19, TextColor3 = color or WHITE, Text = msg, Parent = t }) + local t, l = softPlate( + { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 30, TextColor3 = color or WHITE, Text = msg } + ) + popIn(t) t:SetAttribute("Msg", msg) toastTimers[t] = 0 task.delay(3.2, function() @@ -4164,11 +4195,12 @@ end ---------------------------------------------------------------- статус и мини-игра -local statusLabel = text({ - Size = UDim2.fromOffset(460, 34), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), - Font = TITLE, TextSize = 22, TextXAlignment = Enum.TextXAlignment.Center, TextStrokeTransparency = 0.3, - Text = "🎣 Ждём поклёвку… (клик — смотать)", Visible = false, Parent = gui, -}) +-- вверху, на месте подсказки обучения (она во время рыбалки скрыта) +local statusLabel = softPlate( + { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, + { TextSize = 36, Text = "🎣 Ждём поклёвку… (клик — смотать)" } +) +wobble(statusLabel, 1.2, 1.4) local mgFrame = new("Frame", { Size = UDim2.fromOffset(480, 124), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -100), BackgroundColor3 = WHITE, Visible = false, Parent = gui, @@ -5390,13 +5422,13 @@ local GUIDE_N, GUIDE_GAP, GUIDE_SPEED = 32, 3, 7 -- сколько стрело local W1 = Config.Worlds[1].center local guideStep = 0 -- шаг, отправленный на сервер (атрибут Tutorial может прийти чуть позже) -local guideHint = text({ - Size = UDim2.fromOffset(560, 42), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 64), - BackgroundTransparency = 0.2, BackgroundColor3 = C.bg, Font = TITLE, TextSize = 20, - TextXAlignment = Enum.TextXAlignment.Center, Visible = false, Parent = gui, -}, nil) -corner(12).Parent = guideHint -stroke(C.gold, 2).Parent = guideHint +-- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» +local guideHint, guideHintText = softPlate( + { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, + { TextSize = 42, Text = "" } +) +wobble(guideHint, 1.2, 1.6) +local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) local chevrons = {} @@ -5478,6 +5510,94 @@ local function guideObject(key) return nil end +-- первый подход к табличке: камера крупно на табличку, управление и весь интерфейс убраны; +-- кнопка «Далее» плавно возвращает камеру, интерфейс и управление +local StarterGui = game:GetService("StarterGui") +local BOARD_CAM_TIME, BOARD_FOV = 0.8, 70 +local boardView = nil +local closeBoardView +-- кнопка в отдельном ScreenGui: основной интерфейс на это время выключается целиком +local boardGui = new("ScreenGui", { Name = "BoardView", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 50, Enabled = false, Parent = player:WaitForChild("PlayerGui") }) +btn({ + Size = UDim2.fromOffset(240, 60), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -40), + BackgroundColor3 = C.green, Text = "Далее ▶", TextSize = 26, Parent = boardGui, +}, function() + closeBoardView() +end) + +local function setInterfaceHidden(hidden) + gui.Enabled = not hidden + boardGui.Enabled = hidden + pcall(function() + StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden) + end) + -- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было + if hidden then + boardView.billboards = {} + local map = workspace:FindFirstChild("FishingMap") + for _, d in ipairs(map and map:GetDescendants() or {}) do + if d:IsA("BillboardGui") and d.Enabled then + d.Enabled = false + table.insert(boardView.billboards, d) + end + end + elseif boardView and boardView.billboards then + for _, d in ipairs(boardView.billboards) do + d.Enabled = true + end + boardView.billboards = nil + end +end + +local function boardCamStep() + local bv, cam = boardView, workspace.CurrentCamera + if not bv or not cam then + return + end + local e = easeInOut(math.min(1, (os.clock() - bv.t0) / BOARD_CAM_TIME)) + cam.CFrame = bv.fromCF:Lerp(bv.toCF, e) + cam.FieldOfView = bv.fromFov + (bv.toFov - bv.fromFov) * e + if bv.returning and e >= 1 then + RunService:UnbindFromRenderStep("BoardCam") + cam.CameraType = Enum.CameraType.Custom + setInterfaceHidden(false) + boardView = nil + setMovementLocked(false) + end +end + +local function openBoardView(board) + local cam = workspace.CurrentCamera + -- отходим ровно настолько, чтобы табличка целиком влезла в кадр (по высоте и по ширине) с небольшим запасом + local half = math.tan(math.rad(BOARD_FOV / 2)) + local aspect = cam.ViewportSize.X / math.max(1, cam.ViewportSize.Y) + local dist = math.max((board.Size.Y / 2) / half, (board.Size.X / 2) / (half * aspect)) * 1.15 + boardView = { + t0 = os.clock(), origCF = cam.CFrame, origFov = cam.FieldOfView, + fromCF = cam.CFrame, fromFov = cam.FieldOfView, + -- надписи на лицевой стороне (Front), она смотрит по LookVector + toCF = CFrame.lookAt(board.Position + board.CFrame.LookVector * dist, board.Position), toFov = BOARD_FOV, + } + setMovementLocked(true) + setInterfaceHidden(true) + cam.CameraType = Enum.CameraType.Scriptable + RunService:UnbindFromRenderStep("BoardCam") + RunService:BindToRenderStep("BoardCam", Enum.RenderPriority.Camera.Value + 1, boardCamStep) +end + +closeBoardView = function() + local cam = workspace.CurrentCamera + if not boardView or boardView.returning or not cam then + return + end + boardGui.Enabled = false -- кнопка пропадает сразу, остальной интерфейс — когда камера вернётся + boardView.returning = true + boardView.t0 = os.clock() + boardView.fromCF, boardView.fromFov = cam.CFrame, cam.FieldOfView + boardView.toCF, boardView.toFov = boardView.origCF, boardView.origFov + advanceTutorial(1) +end + -- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем local function guideRoute(step, pos, world) local inW1 = world and world.id == "World1" @@ -5509,6 +5629,12 @@ RunService.RenderStepped:Connect(function() hideChevrons(1) return end + if boardView then -- смотрим на табличку: ни линии, ни подсказок + guideHint.Visible = false + guideHighlight.Enabled = false + hideChevrons(1) + return + end local pos = hrp.Position local world = Config.WorldAt(pos) @@ -5517,7 +5643,12 @@ RunService.RenderStepped:Connect(function() advanceTutorial(2) elseif step == 0 then local board = guideMarker("GuideBoard") - if board and (board - pos).Magnitude < 9 then + if board and (board - pos).Magnitude < 9 and state == "idle" then + local obj = guideObject("Board") + if obj then + openBoardView(obj) -- шаг засчитается по кнопке «Далее» + return + end advanceTutorial(1) end elseif step == 2 and (player:GetAttribute("TotalCaught") or 0) > 0 then @@ -5526,8 +5657,13 @@ RunService.RenderStepped:Connect(function() step = tutorialStep() local route, hint, key = guideRoute(step, pos, world) - guideHint.Text = hint or "" - guideHint.Visible = hint ~= nil and state == "idle" + guideHintText.Text = hint or "" + local showHint = hint ~= nil and state == "idle" + if showHint and (hint ~= lastHint or not guideHint.Visible) then + popIn(guideHint, 0.5) + end + lastHint = hint + guideHint.Visible = showHint local target = (key and state == "idle") and guideObject(key) or nil guideHighlight.Adornee = target or nil guideHighlight.Enabled = target ~= nil diff --git a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua index a095929..148e668 100644 --- a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua @@ -218,9 +218,40 @@ local function sideButton(order, icon, label, key, color, onClick) end ---------------------------------------------------------------- уведомления +-- мультяшный стиль подсказок: крупный круглый шрифт без обводки на мягкой «дымке» — +-- тёмная подложка, которая плавно растворяется к краям; появляются «пружинкой» +local SOFT_EDGES = NumberSequence.new({ + NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.18, 0.62), + NumberSequenceKeypoint.new(0.82, 0.62), NumberSequenceKeypoint.new(1, 1), +}) +-- плашка-дымка (Frame) с текстом внутри; градиент только на плашке, на текст он не действует +local function softPlate(props, textProps) + local plate = new("Frame", props) + plate.BackgroundColor3 = BLACK + plate.BackgroundTransparency = 0 + corner(30).Parent = plate + new("UIGradient", { Transparency = SOFT_EDGES, Parent = plate }) + new("UIPadding", { PaddingLeft = UDim.new(0, 48), PaddingRight = UDim.new(0, 48), Parent = plate }) + local d = { Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextXAlignment = Enum.TextXAlignment.Center, Parent = plate } + for k, v in pairs(textProps) do + d[k] = v + end + return plate, text(d) +end +local function popIn(obj, from) + local sc = obj:FindFirstChildOfClass("UIScale") or new("UIScale", { Parent = obj }) + sc.Scale = from or 0.4 + TweenService:Create(sc, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 }):Play() +end +local function wobble(obj, deg, period) + obj.Rotation = -deg + TweenService:Create(obj, TweenInfo.new(period, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true), { Rotation = deg }):Play() +end + +-- уведомления — под подсказкой обучения, которая стоит в самом верху local toasts = new("Frame", { - Size = UDim2.new(0, 560, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 8), + Size = UDim2.new(0, 900, 0, 200), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 84), BackgroundTransparency = 1, Parent = gui, }, { new("UIListLayout", { Padding = UDim.new(0, 6), HorizontalAlignment = Enum.HorizontalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder }) }) local toastOrder = 0 @@ -250,11 +281,11 @@ local function notify(msg, color) if #items >= 3 then items[1]:Destroy() end - local t = new("Frame", { - Size = UDim2.new(0, 0, 0, 38), AutomaticSize = Enum.AutomaticSize.X, BackgroundColor3 = C.bg, - BackgroundTransparency = 0.15, LayoutOrder = toastOrder, Parent = toasts, - }, { corner(12), stroke(color or WHITE, 2, 0.2), new("UIPadding", { PaddingLeft = UDim.new(0, 16), PaddingRight = UDim.new(0, 16) }) }) - local l = text({ Size = UDim2.new(0, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextSize = 19, TextColor3 = color or WHITE, Text = msg, Parent = t }) + local t, l = softPlate( + { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 30, TextColor3 = color or WHITE, Text = msg } + ) + popIn(t) t:SetAttribute("Msg", msg) toastTimers[t] = 0 task.delay(3.2, function() @@ -327,11 +358,12 @@ end ---------------------------------------------------------------- статус и мини-игра -local statusLabel = text({ - Size = UDim2.fromOffset(460, 34), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -110), - Font = TITLE, TextSize = 22, TextXAlignment = Enum.TextXAlignment.Center, TextStrokeTransparency = 0.3, - Text = "🎣 Ждём поклёвку… (клик — смотать)", Visible = false, Parent = gui, -}) +-- вверху, на месте подсказки обучения (она во время рыбалки скрыта) +local statusLabel = softPlate( + { Size = UDim2.fromOffset(0, 64), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 12), Visible = false, Parent = gui }, + { TextSize = 36, Text = "🎣 Ждём поклёвку… (клик — смотать)" } +) +wobble(statusLabel, 1.2, 1.4) local mgFrame = new("Frame", { Size = UDim2.fromOffset(480, 124), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -100), BackgroundColor3 = WHITE, Visible = false, Parent = gui, @@ -1553,13 +1585,13 @@ local GUIDE_N, GUIDE_GAP, GUIDE_SPEED = 32, 3, 7 -- сколько стрело local W1 = Config.Worlds[1].center local guideStep = 0 -- шаг, отправленный на сервер (атрибут Tutorial может прийти чуть позже) -local guideHint = text({ - Size = UDim2.fromOffset(560, 42), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 64), - BackgroundTransparency = 0.2, BackgroundColor3 = C.bg, Font = TITLE, TextSize = 20, - TextXAlignment = Enum.TextXAlignment.Center, Visible = false, Parent = gui, -}, nil) -corner(12).Parent = guideHint -stroke(C.gold, 2).Parent = guideHint +-- крупная мультяшная подсказка под уведомлениями: покачивается, при смене шага «выпрыгивает» +local guideHint, guideHintText = softPlate( + { Size = UDim2.fromOffset(0, 70), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 10), Visible = false, Parent = gui }, + { TextSize = 42, Text = "" } +) +wobble(guideHint, 1.2, 1.6) +local lastHint = nil local guideFolder = new("Folder", { Name = "TutorialGuide", Parent = workspace }) local chevrons = {} @@ -1641,6 +1673,94 @@ local function guideObject(key) return nil end +-- первый подход к табличке: камера крупно на табличку, управление и весь интерфейс убраны; +-- кнопка «Далее» плавно возвращает камеру, интерфейс и управление +local StarterGui = game:GetService("StarterGui") +local BOARD_CAM_TIME, BOARD_FOV = 0.8, 70 +local boardView = nil +local closeBoardView +-- кнопка в отдельном ScreenGui: основной интерфейс на это время выключается целиком +local boardGui = new("ScreenGui", { Name = "BoardView", ResetOnSpawn = false, IgnoreGuiInset = true, DisplayOrder = 50, Enabled = false, Parent = player:WaitForChild("PlayerGui") }) +btn({ + Size = UDim2.fromOffset(240, 60), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -40), + BackgroundColor3 = C.green, Text = "Далее ▶", TextSize = 26, Parent = boardGui, +}, function() + closeBoardView() +end) + +local function setInterfaceHidden(hidden) + gui.Enabled = not hidden + boardGui.Enabled = hidden + pcall(function() + StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, not hidden) + end) + -- надписи над объектами (порталы, лавки) тоже прячем, потом возвращаем как было + if hidden then + boardView.billboards = {} + local map = workspace:FindFirstChild("FishingMap") + for _, d in ipairs(map and map:GetDescendants() or {}) do + if d:IsA("BillboardGui") and d.Enabled then + d.Enabled = false + table.insert(boardView.billboards, d) + end + end + elseif boardView and boardView.billboards then + for _, d in ipairs(boardView.billboards) do + d.Enabled = true + end + boardView.billboards = nil + end +end + +local function boardCamStep() + local bv, cam = boardView, workspace.CurrentCamera + if not bv or not cam then + return + end + local e = easeInOut(math.min(1, (os.clock() - bv.t0) / BOARD_CAM_TIME)) + cam.CFrame = bv.fromCF:Lerp(bv.toCF, e) + cam.FieldOfView = bv.fromFov + (bv.toFov - bv.fromFov) * e + if bv.returning and e >= 1 then + RunService:UnbindFromRenderStep("BoardCam") + cam.CameraType = Enum.CameraType.Custom + setInterfaceHidden(false) + boardView = nil + setMovementLocked(false) + end +end + +local function openBoardView(board) + local cam = workspace.CurrentCamera + -- отходим ровно настолько, чтобы табличка целиком влезла в кадр (по высоте и по ширине) с небольшим запасом + local half = math.tan(math.rad(BOARD_FOV / 2)) + local aspect = cam.ViewportSize.X / math.max(1, cam.ViewportSize.Y) + local dist = math.max((board.Size.Y / 2) / half, (board.Size.X / 2) / (half * aspect)) * 1.15 + boardView = { + t0 = os.clock(), origCF = cam.CFrame, origFov = cam.FieldOfView, + fromCF = cam.CFrame, fromFov = cam.FieldOfView, + -- надписи на лицевой стороне (Front), она смотрит по LookVector + toCF = CFrame.lookAt(board.Position + board.CFrame.LookVector * dist, board.Position), toFov = BOARD_FOV, + } + setMovementLocked(true) + setInterfaceHidden(true) + cam.CameraType = Enum.CameraType.Scriptable + RunService:UnbindFromRenderStep("BoardCam") + RunService:BindToRenderStep("BoardCam", Enum.RenderPriority.Camera.Value + 1, boardCamStep) +end + +closeBoardView = function() + local cam = workspace.CurrentCamera + if not boardView or boardView.returning or not cam then + return + end + boardGui.Enabled = false -- кнопка пропадает сразу, остальной интерфейс — когда камера вернётся + boardView.returning = true + boardView.t0 = os.clock() + boardView.fromCF, boardView.fromFov = cam.CFrame, cam.FieldOfView + boardView.toCF, boardView.toFov = boardView.origCF, boardView.origFov + advanceTutorial(1) +end + -- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем local function guideRoute(step, pos, world) local inW1 = world and world.id == "World1" @@ -1672,6 +1792,12 @@ RunService.RenderStepped:Connect(function() hideChevrons(1) return end + if boardView then -- смотрим на табличку: ни линии, ни подсказок + guideHint.Visible = false + guideHighlight.Enabled = false + hideChevrons(1) + return + end local pos = hrp.Position local world = Config.WorldAt(pos) @@ -1680,7 +1806,12 @@ RunService.RenderStepped:Connect(function() advanceTutorial(2) elseif step == 0 then local board = guideMarker("GuideBoard") - if board and (board - pos).Magnitude < 9 then + if board and (board - pos).Magnitude < 9 and state == "idle" then + local obj = guideObject("Board") + if obj then + openBoardView(obj) -- шаг засчитается по кнопке «Далее» + return + end advanceTutorial(1) end elseif step == 2 and (player:GetAttribute("TotalCaught") or 0) > 0 then @@ -1689,8 +1820,13 @@ RunService.RenderStepped:Connect(function() step = tutorialStep() local route, hint, key = guideRoute(step, pos, world) - guideHint.Text = hint or "" - guideHint.Visible = hint ~= nil and state == "idle" + guideHintText.Text = hint or "" + local showHint = hint ~= nil and state == "idle" + if showHint and (hint ~= lastHint or not guideHint.Visible) then + popIn(guideHint, 0.5) + end + lastHint = hint + guideHint.Visible = showHint local target = (key and state == "idle") and guideObject(key) or nil guideHighlight.Adornee = target or nil guideHighlight.Enabled = target ~= nil