|
| 05 May 2017 10:18 PM |
| I've been trying to figure this out, and I really would rather do it than compare a free model to it. Can you take a look and tell me what's wrong with this code? local TeleportService = game:GetService("TeleportService") local level1Id = ######### local level2Id = ######### function onClicked(playerWhoClicked) local player = game.Players:GetPlayerFromCharacter(playerWhoClicked.Parent) if player then TeleportService:Teleport(level1Id, player) end end script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 05 May 2017 10:19 PM |
| Ugh... why does roblox compress your lines... |
|
|
| Report Abuse |
|
|
|
| 05 May 2017 10:24 PM |
| local TeleportService = game:GetService("TeleportService") local level1Id = ######### local level2Id = ######### function onClicked(playerWhoClicked) Local player = game.Players:GetPlayerFromCharacter(playerWhoClicked.Parent) if player then TeleportService:Teleport(level1Id, player) end end script.Parent.MouseButton1Click:connect(onClicked) Hope that's better. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 May 2017 10:42 PM |
| Ugh, thought someone in the scripting section could help me with a script. |
|
|
| Report Abuse |
|
|
|
| 05 May 2017 10:45 PM |
| Someone will if you wait. Wait a day and you'll have a response. But I can't do much with censored code. You can try PMing me it, to see if it doesn't censor. |
|
|
| Report Abuse |
|
|
|
| 05 May 2017 10:53 PM |
| The only part censored is the ID's though. |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 May 2017 11:19 AM |
| You didn't even tell us the error |
|
|
| Report Abuse |
|
|
Salinas23
|
  |
| Joined: 28 Dec 2008 |
| Total Posts: 37141 |
|
|
| 06 May 2017 11:33 AM |
mousebutton1click does not return anything
I have a spider on my back. |
|
|
| Report Abuse |
|
|
|
| 06 May 2017 11:33 AM |
Of course it doesn't, it's an event...
|
|
|
| Report Abuse |
|
|
|
| 06 May 2017 12:10 PM |
| Someone helped me. The error was that it wasn't working. |
|
|
| Report Abuse |
|
|
|
| 06 May 2017 05:49 PM |
| Is it a local script or server script? |
|
|
| Report Abuse |
|
|