Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This script wont open the other gui it is not working and there is no errors?

Asked by 4 years ago

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)

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Activated isn't a function of user interface buttons. To get what you want, use Button1Down instead.

0
thanks legendarycoos11 1 — 4y
Ad
Log in to vote
0
Answered by
palav 104
4 years ago

If vtb is a button, use MouseButton1Click

Answer this question