Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 02:41 PM |
The script works fine in studio, but not in game.
function onTouched() game:GetService('TeleportService'):Teleport(364909697) end script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
|
| 17 Feb 2016 02:43 PM |
need to define the second parameter, player.
also i dont think teleportservice works in studio |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
| |
|
|
| 17 Feb 2016 02:52 PM |
need to define the second parameter, player.
also i dont think teleportservice works in studio [2]
Why did you point out that its a game universe? That has nothing to do with it. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 02:53 PM |
No, the place that it teleports to is in the game universe...
|
|
|
| Report Abuse |
|
|
|
| 17 Feb 2016 02:53 PM |
mk so
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- teleport stuff end)
|
|
|
| Report Abuse |
|
|
|
| 17 Feb 2016 02:55 PM |
That doesn't even make sense. The hub world and all the sub worlds are all part of the game universe.
And it still doesn't make a difference either way. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 02:56 PM |
Then I guess I'm an outlaw. 'cause it works on studio.. But not in game..
|
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 03:01 PM |
I've tried everything.. It only works in studio.. Could it be that I need to change it to a local script?
|
|
|
| Report Abuse |
|
|
|
| 17 Feb 2016 03:02 PM |
I just tested it and it definitely doesn't work in studio.
Either way that is not important, you need to define the player for it to work in a server. |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 03:03 PM |
That's because you didn't make the game... I did... You can teleport t games you've made.. Just not someone else's..
|
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 03:04 PM |
And how would I define player? I'm kinda new to this part of scripting 3:
|
|
|
| Report Abuse |
|
|
|
| 17 Feb 2016 03:06 PM |
I know that, I changed it to teleport to my place.
It doesn't work in studio, because the game doesn't know you are Kramer777 in studio it just knows you are 'Player'
Your script never says "Hey this is the player that touched me teleport them here" It just says "teleport here"
Who do you expect it to teleport if you don't tell it who? |
|
|
| Report Abuse |
|
|
| |
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 03:06 PM |
^^ Tried that. Didn't work either.
|
|
|
| Report Abuse |
|
|
|
| 17 Feb 2016 03:09 PM |
local teleportService = game:getService("TeleportService")
script.Parent.Touched:connect(function(basePart) local player = game.Players:getPlayerFromCharacter(basePart.Parent) if (player) then teleportService:Teleport(364909697, player) end end) |
|
|
| Report Abuse |
|
|
Kramer777
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 14696 |
|
|
| 17 Feb 2016 03:14 PM |
@Giga Thanks.. Finally got it working If you wanna check out the thing I'm making here's the link: http://www.roblox.com/games/363503545/ROBLOX-Story-Mode-Alpha
|
|
|
| Report Abuse |
|
|