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 11 years ago
1Frame = game.StarterGui.ScreenGui.WarlandsGameInfo
2 
3function onClick()
4    Frame.Visible = true
5end
6 
7script.Parent.MouseButton1Click:connect(onClick)

WHen I click the button, nothing happens.

1 answer

Log in to vote
0
Answered by 11 years ago

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

1Frame = ScreenGui.WarlandsGameInfo
2 
3function onClick()
4   for k, p in pairs(game.Players:GetPlayers()) do
5p.PlayerGui.Frame.Visible=true
6end
7 
8script.Parent.MouseButton1Click:connect(onClick)
0
Thanks. But what for k, p in pairs(game.Players:GetPlayers()) means? StickMasterNinja2 0 — 11y
Ad

Answer this question