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

GUI change script only works in studio work? [SERVER SCRIPT]

Asked by
Oficcer_F 207 Moderation Voter
6 years ago
Edited 6 years ago

My GUI basically has a bunch of tips, and it changes every 5 seconds, it works in studio, but when I join the game, it only displays TextLabel (the pre-set)... Why??

Here it is: (BTW no errors)

hints = {"Only Gems get saved", "This game is made by Oficcer_F", 
    "Upgrade your base by donating your points to the upgrader! (In your base)", 
    "You cannot use the invincible tool why having a flag", 
    "You cannot pick up a flag while using the invincible tool", 
    "Updates come every 2-3 days!",
    "The first base upgrade is a wall  (100 Gems)",
    "The second base upgrade is a is a labyrinth and a stair, good for protection!  (500 Gems)",
    "If the other team takes your teams flag, everyone looses anywhere from 10-15 points!",
    "If you steal a flag and deliver it too your base, you get anywhere from 70-100 points, and 14-17 points!",
    "If someone on you team steals the other teams flag and delivers it, everyone on the team gets anywhere from 10-25 points!",
    "Buy the invincibility tool for 100 R$"
}




while true do
script.Parent.TextBox.Text = hints[math.random(1,#hints)]
wait(5)
end
1
Is it a server script or local, and use local variables + indent your code. User#19524 175 — 6y
0
It is a server script Oficcer_F 207 — 6y

1 answer

Log in to vote
2
Answered by 6 years ago

You can't access players' PlayerGui using Server Scripts. Use a LocalScript instead

Ad

Answer this question