Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't the GUI text change?

Here's my code:

local Players = game.Players
local Avatarblock = game.ServerStorage.Avatar_loaderblock
local PlayerNameFolder = game.workspace.PlayerNameFolder
local PlayerNameGui = game.ServerStorage.Avatar_loadermodel.GuiBlock.SurfaceGui.NameLabel



Players.PlayerAdded:Connect(function(player)
	
	local PlayerName = Instance.new("StringValue", PlayerNameFolder)
	PlayerName.Value = player.Name
	PlayerName.Name = player.Name
	
	
	local YourLoaderBlock = Avatarblock:Clone()
	YourLoaderBlock.Name = (PlayerName.Value.. "'s plot") 
	PlayerNameGui.Text = (PlayerName.Value.. "'s plot")
	
	

	
	
end)

The part where it changes the value works, just looking for the write way to write it for GUIs.

1 answer

The PlayerNameGui variable is set to the NameLabel in the ServerStorage service. Changing the PlayerNameGui.Text changes the property within ServerStorage. I'm unsure of what is supposed ot be happening, but the solution is to clone the PlayerNameGui and parent it under whatever you want the SurfaceGui to be on, then change the property.

This discussion is preserved as it was. New answers, comments, and votes are closed.