This script wont open or close
wait(10) local player = game.Players.LocalPlayer local Character = player.Character or player.CharacterAdded:Wait() local StarterGui = game:GetService("StarterGui") local Open = false local Mouse = player:GetMouse() local startgui = player.PlayerGui.Starmenu local start = player.PlayerGui.Starmenu.Frame.Start local audio = player.PlayerGui.Audio local vtb = player.PlayerGui.Starmenu.Frame.Viewtrendsbutton local trendgui = player.PlayerGui.Trendinggui.Frame local vtbclose = player.PlayerGui.Trendinggui.Frame.Close vtb.Activated:Connect(function() trendgui.Visible = true audio.Click:Play() startgui.Enabled = false end)
Activated isn't a function of user interface buttons. To get what you want, use Button1Down instead.