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

0

Can you send your script?

0

You can't change anything in the PlayerGUI from the server, it needs to be done on the client.

0

oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

0

waitwaitwait

0

i tried :fireAllClients and it still wont work!

0

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

0

this is a surface gui. so i doubt i have to use a localscript

0

I'd write you an answer but not in a place where I could do that atm

0

can you please write me an answer? ive been stuck on this for a couple of days now.

0

oh didnt notice it was a surface gui :) ... what is it you are trying to do?

0

im trying to change it to the players name when they click a button