so, when i try to add anything other than the value of my string to my textlabel, it does it but when i try to add the string to the text of my textlabel, it does nothing. serverscript: script.Parent.OnServerEvent:Connect(function(plr,gui,text)
if gui.Eigh.Text == "108" then
if game.Workspace.Username101.SurfaceGui.TextLabel.Text == "" then
game.Workspace.Username108.SurfaceGui.TextLabel.Text = text
end
elseif gui.Eigh.Text == "301" then
if game.Workspace.Username101.SurfaceGui.TextLabel.Text == "" then
game.Workspace.Username301.SurfaceGui.TextLabel.Text = text
end
elseif gui.Eigh.Text == "403" then
if game.Workspace.Username101.SurfaceGui.TextLabel.Text == "" then
game.Workspace.Username403.SurfaceGui.TextLabel.Text = text
nd
end
end)
localscript:
local text = script.Parent.Parent.Parent.UserName.Value
local gui = script.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Eigh.Text == "108" then
if game.Workspace.Username101.SurfaceGui.TextLabel.Text == "" then
script.Remote:FireServer()
game.Workspace.Username108.SurfaceGui.TextLabel.Text = game.Players.LocalPlayer.Name
else
script.Parent.Parent.TextLabel.Text = "In Use"
wait(.5)
script.Parent.Parent.TextLabel.Text = "Pick A Room!"
end
elseif script.Parent.Text == "301" then
game.ReplicatedStorage.Reception:FireServer()
elseif script.Parent.Text == "403" then
game.ReplicatedStorage.Reception:FireServer()
end
end)

11 comments
Can you send your script?
You can't change anything in the PlayerGUI from the server, it needs to be done on the client.
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
waitwaitwait
i tried :fireAllClients and it still wont work!
hmm..That could mean a lot of things... Just make sure the code that messes with the text in in a local script on the client. If you could post your updated code and add some good formatting, that would be nice
this is a surface gui. so i doubt i have to use a localscript
I'd write you an answer but not in a place where I could do that atm
can you please write me an answer? ive been stuck on this for a couple of days now.
oh didnt notice it was a surface gui :) ... what is it you are trying to do?
im trying to change it to the players name when they click a button