I am trying to teleport a player when they touch a part, but it isn't bringing any output, therefore, not letting me debug. Code :
1 | local plyr = game.Players.LocalPlayer |
2 |
3 | function onTouched() |
4 | script.Parent.Touched:connect(plyr).Torso.Position = Vector 3. new( 5.194 , 3.37 , 45.765 ) |
5 | end |
This is what you left out:
1 | local plyr = game.Players.LocalPlayer |
2 |
3 | function onTouched() |
4 | script.Parent.Touched:connect(plyr).Torso.Position = Vector 3. new( 5.194 , 3.37 , 45.765 ) |
5 | end |
6 |
7 | script.Parent.Touched:connect(onTouched) |
01 | local plyr = game.Players.LocalPlayer |
02 |
03 |
04 |
05 | function onTouched() |
06 |
07 | script.Parent.Touched:connect(plyr).Torso.Position = Vector 3. new( 5.194 , 3.37 , 45.765 ) |
08 |
09 | end |
10 |
11 |
12 |
13 | script.Parent.Touched:connect(onTouched) |