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

how do i change the text of a surfacegui through a remotevent?

Asked by 5 years ago

ive been working on this for quite a long time and its still not working localscript:

local text = script.Parent.Parent.Parent.UserName.Value -- stringvalue

script.Parent.MouseButton1Click:Connect(function()

if script.Parent.Parent.Eigh.Text == "108" then

if game.Workspace.Username101.SurfaceGui.TextLabel.Text == "" then

game.ReplicatedStorage.Reception:FireServer(text)

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)

serverscript:

game.ReplicatedStorage.Reception.OnServerEvent:Connect(function(plr,text)

if plr.PlayerGui["RoomPick/Welcome"].Frame.Eigh.Text == "108" then

print(text)

game.Workspace.Username101.SurfaceGui.TextLabel.Text = text

elseif plr.PlayerGui["RoomPick/Welcome"].Frame.Eigh.Text == "301" then

script.Parent.Parent.RemoteEvent:FireServer()

elseif plr.PlayerGui["RoomPick/Welcome"].Frame.Eigh.Text == "403" then

script.Parent.Parent.RemoteEvent:FireServer()

end

end)

Answer this question