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

how do i make a random player teleport to a brick?

im new to scripting lua, any help would be massively apprectated, thanks.

1 comment

0

when will the player teleport? when the touch something, click something, every 30 seconds?

1 answer

Here's a few things you would want to learn to accomplish this;

How to use GetChildren() . This will be used to make a Table of all Players in the game. game.Players:GetChildren(). Then you would want to learn how to actually access that Table;

Info on Tables here. Then you would simply move that Player's Character using :MoveTo(Position). Here's the Info on that.

If you don't know how to code Lua, I wouldn't recommend learning Tables first. I would start with learning the basics, and come back to this when everything I've stated above makes a little more sense. There are plenty of helpful guides and videos online.

If you still have any questions feel free to ask!

1 comment

0

I'd recommend using :GetPlayers() rather than :GetChildren() for convenience. But both work the same.

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