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

Is anything wrong with this?

Asked by 10 years ago

I wanted to know what is wrong with it. I want it so that when the Player touches the brick, it Teleports to a random Location within a 200 by 200 Radius on the x and z axis. And I would leave the y axis where it is(0.59) but I am not sure how to do that. Anyways, here it is:

local Player = game.Players:GetChildren

local TelePart = game.Workspace.TeleBrick

function Tele()
    TelePart.Vector3.new (math.random 200, 1. 200)
end

script.Parent.Touched:connect(Tele)

So whats wrong with it? It says function arguments expected near local on the 3rd line. also I feel like there is something and it may teleport the Player and not the Brick. Please help.

Answer this question