So In my Admin Panel GUI, I have a textbox where I type the player's name and click the "teleport to" button. However, I'm using a UI library. So I can make the variable whatever I want. I made it "text". The code for the button looks like this:
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.text.Character.HumanoidRootPart.CFrame
But, the problem is that the game thinks that I'm to teleport to a player named "text", and of course there's no player named text. Is there a way I could insert the variable into the object?
section1:addTextbox("Player:", "Username Here", function(text, focusLost)
print("Input", text)
if focusLost then
venyx:Notify("Player", text)
end
end)
section1:addButton("Fastkill")
section1:addButton("Kill")
section1:addButton("Bring")
section1:addButton("Fastbring")
section1:addButton("Teleport To", function()
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players.text.Character.HumanoidRootPart.CFrame
end)
(Section1 refering to a section in the gui.) (Lost focus referring to when the user loses focus of the textbox.)

1 comment
Helps thanks! Also, I don't intend to cause harm. I mostly pen test my games.