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

How the script failed?

Asked by 10 years ago
Frame = game.StarterGui.ScreenGui.WarlandsGameInfo

function onClick()
    Frame.Visible = true
end

script.Parent.MouseButton1Click:connect(onClick)

WHen I click the button, nothing happens.

1 answer

Log in to vote
0
Answered by 10 years ago

Because you have to get all the players, it doesnt update, try this

Frame = ScreenGui.WarlandsGameInfo

function onClick()
   for k, p in pairs(game.Players:GetPlayers()) do
p.PlayerGui.Frame.Visible=true
end

script.Parent.MouseButton1Click:connect(onClick)

0
Thanks. But what for k, p in pairs(game.Players:GetPlayers()) means? StickMasterNinja2 0 — 10y
Ad

Answer this question