I want to teleport players with my GUI (It's something like a whitelist) but everytime I teleport them they just get back to their old spot.
local TextBox = script.Parent.Button.teleport script.Parent.Button.teleport.FocusLost:connect(function(enterPressed) if enterPressed then local PlayerToFind = TextBox.Text local plr1 = game.Players.LocalPlayer.Character local plr2 = game.Workspace:FindFirstChild(PlayerToFind) plr2.HumanoidRootPart.CFrame = CFrame.new(-5951.962, -62.35, -4557.551) TextBox.Text = "WHITELISTED" wait(1) TextBox.Text = "Whitelist:" wait(2) end end)
local Players = game.Players for i, players in ipairs(Players:GetPlayers()) do players.SetPrimaryCFrame(--your value--) end
I don't know if this actually works, but if it works, alert me