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: Button GUI error, any help?

Previous Thread :: Next Thread 
Robin5D is online. Robin5D
Joined: 03 Dec 2011
Total Posts: 227
10 Feb 2016 08:44 PM
script.Parent.MouseButton1Click:connect(function(plr)
game:GetService("TeleportService"):Teleport(361741129, plr)
end)

Inside a GUI button, works in studio, in-game it says 'Invalid player to teleport'
Report Abuse
Robin5D is online. Robin5D
Joined: 03 Dec 2011
Total Posts: 227
10 Feb 2016 08:56 PM
bump
Report Abuse
ranvir2050 is not online. ranvir2050
Joined: 20 Dec 2014
Total Posts: 321
10 Feb 2016 09:00 PM



While thruse do,,
Script.parmt.coulor= blue
script.Parent.MouseButton1Click:connect(function(plr)
game:GetService("TeleportService"):Teleport(361741129, plr)
end)
Wait/4script.Parent.MouseButton1Click:connect(function(plr)
game:GetService("TeleportService"):Teleport(361741129, plr)
end)
End end
End
Report Abuse
Robin5D is online. Robin5D
Joined: 03 Dec 2011
Total Posts: 227
10 Feb 2016 09:15 PM
bump2, this guy dosnt know scripting
Report Abuse
ranvir2050 is not online. ranvir2050
Joined: 20 Dec 2014
Total Posts: 321
10 Feb 2016 09:16 PM
lies im the best
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
10 Feb 2016 09:18 PM
'plr' isn't a valid argument to the event.

Use a local script and put:

local player = game.Players.LocalPlayer

button.MouseButton1Down:connect(function()
game:GetService("TeleportService"):Teleport(361741129, player)
end)



Report Abuse
ElectroTM is not online. ElectroTM
Joined: 23 Nov 2012
Total Posts: 1135
10 Feb 2016 09:18 PM
Try getting the LocalPlayer instead?

local Player=game:GetService("Players").LocalPlayer

--Replace plr with Player

Not 100% sure this will work.


y-y-you too...
Report Abuse
ranvir2050 is not online. ranvir2050
Joined: 20 Dec 2014
Total Posts: 321
10 Feb 2016 09:19 PM
no no no use while thruse loops and global
Report Abuse
LilMcManiac is online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
10 Feb 2016 09:46 PM
Get out Ranvir.
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