Problem
I am trying to create a simple brick that when clicked, text appears at the bottom of your screen. I believe I have the script correct, but it might just not be working due to where it is located within the game. I have already tried editing the code, but no errors occur.
Here is the script:
function onClick()
game.StarterGui.BottomText.Frame.TextLabel.TextTransparency = 0
game.StarterGui.BottomText.Frame.TextLabel.Text = ("The handle appears to have been removed...")
wait(1)
game.StarterGui.BottomText.Frame.TextLabel.TextTransparency = 0.3
wait(0.5)
game.StarterGui.BottomText.Frame.TextLabel.TextTransparency = 0.8
wait(0.2)
game.StarterGui.BottomText.Frame.TextLabel.TextTransparency = 1
Starter GUI replicates to players when they join/respawn depending on the ResetOnSpawn property, meaning that any change you make to objects in starter GUI don’t actually occur to the player(s). To achieve what you’re wanting to do, you’re going to want to use a local script within the gui itself.
For future reference, you should know that changing properties in the StarterGui will not do anything. Instead, you should get the player (click detector has a player arguement) and do Player.PlayerGui.ScreenGui with the screen gui’s name replacing ‘ScreenGui’.
I’m aware, I’m just simply saying if he has a use for that (say for example cloning a gui) then he would use that. You can actually create UI instances on the server.
I’m simply clarifying the replication boundary. I am well aware of the ability to clone UI objects into a players gui. Your code did not imply that you had cloned an object.
Player.PlayerGui.ScreenGui -- no predefined variable or clone method