Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a Player teleported into a prison?

Hello! Apex back again. I am back with another script, but made by my friend "Dxsigned". So what he is trying to do is, Whoever player name is the script, when he/she joins, they are teleported into a prison. He tried using instances. The main purposes is to get a player teleported in the prison if their name is in the script. Thank you sm.

p = Instance.new("Part")	p.Anchored = true	p.Position = Vector3.new(0,500,0)	p.Size = Vector3.new(50,0,50)	p.Parent = game.Workspace	p.Locked = true		p.Transparency = 0.5		

p = Instance.new("Part")	p.Anchored = true	p.Position = Vector3.new(25,501,0)	p.Size = Vector3.new(0,50,50)	p.Parent = game.Workspace	p.Locked = true		p.Transparency = 0.5		

p = Instance.new("Part")	p.Anchored = true	p.Position = Vector3.new(-25,501,0)	p.Size = Vector3.new(0,50,50)	p.Parent = game.Workspace	p.Locked = true		p.Transparency = 0.5		

p = Instance.new("Part")	p.Anchored = true	p.Position = Vector3.new(0,501,25)	p.Size = Vector3.new(50,50,0)	p.Parent = game.Workspace	p.Locked = true		p.Transparency = 0.5			

p = Instance.new("Part")	p.Anchored = true	p.Position = Vector3.new(0,501,-25)	p.Size = Vector3.new(50,50,0)	p.Parent = game.Workspace	p.Locked = true		p.Transparency = 0.5			


p = Instance.new("Part")	p.Anchored = true	p.Position = Vector3.new(0,525,0)	p.Size = Vector3.new(50,0,50)	p.Parent = game.Workspace	p.Locked = true		p.Transparency = 0.5		

p= game.Players:GetChildren()		
for i= 1, #p do		
	if p[i] ~= "NAME" then				
	p[i].Character.Torso.CFrame = CFrame.new(0,515,0)

P.S. Script is made by Dxsigned.

2 comments

0

Are you trying to teleport players with a matching username into a prison?

0

Yes.

1 answer

✓ Accepted answer

Here's the script

  • Instead of *CFrame I used :MoveTo() and in the brackets I put the spawn location which is (p1)

  • There is a wait statement because not everything loads fast so It needs some time to find out that player is in players

p1 = Instance.new("Part")    p1.Anchored = true   p1.Position = Vector3.new(0,500,0)   p1.Size = Vector3.new(50,0,50)   p1.Parent = game.Workspace   p1.Locked = true     p1.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(25,501,0)  p.Size = Vector3.new(0,50,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(-25,501,0) p.Size = Vector3.new(0,50,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,501,25)  p.Size = Vector3.new(50,50,0)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5            

p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,501,-25) p.Size = Vector3.new(50,50,0)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5            


p = Instance.new("Part")    p.Anchored = true   p.Position = Vector3.new(0,525,0)   p.Size = Vector3.new(50,0,50)   p.Parent = game.Workspace   p.Locked = true     p.Transparency = 0.5        

wait(1)
p= game.Players:GetChildren()       
for i= 1, #p do     
    if p[i] ~= "NAME" then              
    p[i].Character:MoveTo(p1.Position)
end
end

1 comment

0

Tysm

This discussion is preserved as it was. New answers, comments, and votes are closed.