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

Teleport Random Player To Position Dont Works?

Asked by 5 years ago
local randomPlayer = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]
randomPlayer.TeamColor = BrickColor.new("Really red")
randomPlayer.Character.Humanoid.WalkSpeed = 0
randomPlayer.Character.Humanoid.JumpPower = 0
randomPlayer.PlayerGui.CatcherGui.Frame.Visible = true

so this player will need to catch others but he spawns in same position like others. so i want to make it that he will spawn to another position i tried this script here

game.Workspace.Player.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(0, 50, 0))

Dont worry i been changed the position. from http://robloxdev.com/articles/How-to-teleport-within-a-Place But its Dont works. Just script stops working.? Thanks?

1 answer

Log in to vote
1
Answered by
RAYAN1565 691 Moderation Voter
5 years ago
Edited 5 years ago

Try this:

game.Workspace.Player:SetPrimaryPartCFrame(CFrame.new(0, 50, 0))

Also make sure the disabled property on the script is set to false. That may sometimes be the problem.

Or, just take a look at the script that's teleporting all your players and figure out a way to prevent the "catcher" from being teleported.

0
i did it with GetPlayers by myself But thanks alot u tryed you need it Accepted! User#21499 0 — 5y
Ad

Answer this question