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

How Would I Reference And Get The Text Of A Label Through A Remote Event?

Asked by 5 years ago
Edited 5 years ago

This question has been solved by the original poster.

So, I want to print the text and kick a player through a gui and have the kicking through a remote event on to the server side. When I try to find the players name or even reference the text of a label or text box, it prints empty.

Local Script:

script.Parent.MouseButton1Click:Connect(function()

local RE = game:GetService("ReplicatedStorage"):WaitForChild("Events",5)

RE.KickPlayerEvent:FireServer()

end)

Server Script:

local RE = game:GetService("ReplicatedStorage"):WaitForChild("Events",5)



RE.KickPlayerEvent.OnServerEvent:Connect(function(plr)

local adminpanel = plr.PlayerGui.AdminPanel

local MS = adminpanel.Holder.MainScreen

local KS = MS.KickScreen

local KB = KS.KickButton

local NB = KS.NameBox

local RB = KS.ReasonBox

local TT = KS.Title

local UR = KS.UnderReason

local UN = KS.UnderName

print(UR.Text.." | "..UN.Text.." | "..plr.Name)

end)

When I want to print it, this is the result: https://gyazo.com/fa4b54adef79b59d110dce916d45a8ce

I would have "killerbrenden" as the name and "Test" as for the reason, and it would print, the Reason, The Player Kicked, and the player who kicked them.

1
Never mind, I had to reference it all through the local script and send it into the server, I got it. killerbrenden 1537 — 5y

Answer this question