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

client-breaking bug: is this a problem with roblox's engine, or my scripting?

Asked by 4 years ago

please watch the following video for context.

https://www.youtube.com/watch?v=LnEh67gdB0I

i have no idea what's wrong with my script. this only happens in this specific game, other games with gui-modifying scripts are working just fine.

i've tried work arounds, but all return failure. i've completely given up.

2 answers

Log in to vote
0
Answered by
Prestory 1395 Moderation Voter
4 years ago
Edited 4 years ago

You have to change the GUI which is currently inside the player you can do this by

replacing this part of your code

game.StarterGui.objectivelabel.objective.Text = "objective: escape the facility:"

with this

local PlayerGui = playerWhoClicked:WaitForChild('PlayerGui')

PlayerGui:WaitForChild('objectivelabel').objective.Text = "objective: escape the facility:"

0
By the way if you press play and go to Players > HeroComeDatEli you will find PlayerGui there which is the one that appears on the players screen Prestory 1395 — 4y
0
thank you so much. HereComeDatEli 2 — 4y
0
No problem have fun Prestory 1395 — 4y
Ad
Log in to vote
0
Answered by
Fifkee 2017 Community Moderator Moderation Voter
4 years ago

Work with the PlayerGui, not the StarterGui. The StarterGui contains what is moved into the PlayerGui when the player is respawned/joining the server. Therefore any changes made to it will not be observable.

The location of the PlayerGui is localPlayer.PlayerGui, or game:GetService('Players').LocalPlayer.PlayerGui;

Answer this question