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

why is there and error in this local script? I am trying to make a teleporter.

local Teleports = game.Workspace:FindFirstChild("Teleports"):GetChildren()
local plr = script.Parent.Parent

if script.Parent.GameStarting.Frame.GameStartingText.Text = "Game ends in"
then
	
T = Teleports[math.random(1, #Teleports)]
	plr.Character:MoveTo(T)	
	
end

1 comment

0

use a server script for teleporting

2 answers

T is a object not a vector3. Try changing Line 8 to:

plr.Character:MoveTo(T.Position)

2 comments

0

AAA I DIDNT MEAN TO ACCEPT IT DIDNT WORK

0

it did not work

you forgot to add "local" , when creating a variable you have to type "local" so the script knows that you're adding a variable and not changing/setting a pre-existing variable, AND just like how alphexus said, T is indeed not a Vector nor a CFrameValue its an object so to put it simply :

  1. place local before adding the variable T

  2. T is not A CFrameValue

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