akuma67
|
  |
| Joined: 17 Aug 2014 |
| Total Posts: 69 |
|
|
| 01 Aug 2017 12:28 PM |
I'm trying to make it so that when you touch a block, you get teleported to another place. It doesn't work, here's my current code:
local TeleportService = game:GetService("TeleportService") local level1Id = 953034005 local level2Id = 953034005 function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TeleportService:Teleport(level1Id, player) end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
Artismz
|
  |
| Joined: 14 Jun 2016 |
| Total Posts: 979 |
|
|
| 01 Aug 2017 12:40 PM |
You made the levels the exact same place...
|
|
|
| Report Abuse |
|
|
akuma67
|
  |
| Joined: 17 Aug 2014 |
| Total Posts: 69 |
|
|
| 01 Aug 2017 12:45 PM |
@Artismz Oh yeah, I screwed up
|
|
|
| Report Abuse |
|
|
akuma67
|
  |
| Joined: 17 Aug 2014 |
| Total Posts: 69 |
|
|
| 01 Aug 2017 12:50 PM |
I edited it: local TeleportService = game:GetService("TeleportService") local level1Id = 953034005 local level2Id = 952998887 function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TeleportService:Teleport(level1Id, player) end end script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|