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

How to I make all players teleport to a brick?

Asked by 10 years ago

What's a script where it chooses all players in the game, and teleports them to a block?

2 answers

Log in to vote
0
Answered by 10 years ago

If you want it as a tool use this script:

local debounce = false --Just in case
local m = Instance.new("Message")
m.Parent = game.Players.LocalPlayer
Tool = script.Parent
Player = game.Players.LocalPlayer

function onButton1Down(mouse)
Player.Character.Torso.CFrame = CFrame.new(game.Workspace.Spawn's Name.Position) + Vector3.new(0,3,0)
end

function onSelected(mouse)
    mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

function onDeselect(mouse)
end

script.Parent.Selected:connect(onSelected)
script.Parent.Deselected:connect(onDeselect)

Local script in Hopper

Ad
Log in to vote
0
Answered by
KAAK82 16
10 years ago

the Following goes in a Part's LocalScript;

plr = game.Players.LocalPlayer
char = plr.Character
brick = game.Workspace.Spawn -- change Spawn to ur Brick

function onTouch()
    char:MoveTo(brick.Position)
end

script.Parent.Touched(onTouch)

see? no big long lines... also, trust me... I have an automatic teleporter that teleports players every round to their Spawns in my other account... so this should work... and u don't really need Vector3.new() cos only some people use it to Rotate Players... Hope I helped... Also, check me out on Roblox and check my Free Models... I made myself, there's also a Random Teleporter if u click a Button (Gui Button)

Answer this question