So I was working on a trolling gui for a game of mine and if you typed someone's username it would keep loop tping to them, but how would i check if that name was in players. and how would I add the name to the script, and with loop tping to them if you touched them they would get flinged which is another script i found online.
togglebutton = script.Parent.Parent.TextButton
players= game.Players:GetChildren()
toggle = script.Parent.Parent.Toggle
repeat wait(0.1)
until script.Parent.Text == players.Name
local player = script.Parent.Text
while toggle.Value == true do wait(0.1)
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players(player).Character.HumanoidRootPart.CFrame
end
togglebutton.MouseButton1Click:Connect(function()
toggle.Value = not toggle.Value
end)
