generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why won't this do anything?

Previous Thread :: Next Thread 
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
08 Nov 2016 07:03 PM
I'm following the instructions on the wiki?

game.Players.PlayerAdded:connect(function(oke)


script.Parent.MouseButton1Click:connect(function(ok)
game:GetService("TeleportService"):Teleport(506701087,oke)
end)
end)


Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37141
08 Nov 2016 07:04 PM
you dont need playeradded function for this??

all you need is

script.Parent.MouseButton1Click:connect(function(ok)
game:GetService("TeleportService"):Teleport(506701087,ok)
end)

(make sure ok is spelt correctly on both parts)

I have a spider on my back.
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
08 Nov 2016 07:06 PM
Still won't work?


Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37141
08 Nov 2016 07:09 PM
wait

is this a gui?
make sure its a localscript

then use this

script.Parent.MouseButton1Click:connect(function()
game:GetService("TeleportService"):Teleport(506701087)
end)


I have a spider on my back.
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
08 Nov 2016 08:30 PM
^ Don't know what your doing bud.


Make sure you define the player, and then use it in the teleportation.


EXAMPLE:

local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
game:GetService("TeleportService"):Teleport(PLACEID, player)
end)


R$2,489
Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37141
08 Nov 2016 09:44 PM
^ Don't know what you're doing bud.

You dont need to define player inside a local script

I have a spider on my back.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image