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

why wont roblox accept my stringvalue's text?

Asked by 5 years ago
Edited 5 years ago

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)
0
Can you send your script? MegaManSam1 207 — 5y
0
You can't change anything in the PlayerGUI from the server, it needs to be done on the client. ForeverBrown 356 — 5y
0
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh natonator63 29 — 5y
0
waitwaitwait natonator63 29 — 5y
View all comments (7 more)
0
i tried :fireAllClients and it still wont work! natonator63 29 — 5y
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 ForeverBrown 356 — 5y
0
this is a surface gui. so i doubt i have to use a localscript natonator63 29 — 5y
0
I'd write you an answer but not in a place where I could do that atm ForeverBrown 356 — 5y
0
can you please write me an answer? ive been stuck on this for a couple of days now. natonator63 29 — 5y
0
oh didnt notice it was a surface gui :) ... what is it you are trying to do? ForeverBrown 356 — 5y
0
im trying to change it to the players name when they click a button natonator63 29 — 5y

Answer this question