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 » Scripting Helpers
Home Search
 

Re: GUI TELEPORT BUTTON NEEDS FIXING

Previous Thread :: Next Thread 
ThatWhipperSnapper is not online. ThatWhipperSnapper
Joined: 11 May 2012
Total Posts: 1566
10 Oct 2012 12:32 PM
I made this,and It's not working,GRANTED,I've been awake for 14 hours o.o





function onButtonClicked()
local player = game.Players.LocalPlayer
if player == nil or player.Character == nil then return end
local char = player.Character.Torso
char.CFrame = CFrame.new(Vector3.new(-303.1, 128.5, -40.19))
script.Parent.MouseButton1Down:connect(onButtonClicked)
end
end
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Oct 2012 12:41 PM
This is nothing wrong with it at all.
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 12:41 PM
... You can't connect the function to an event inside of the function. Otherwise the function will never run and will never connect.

Move this line:

    script.Parent.MouseButton1Down:connect(onButtonClicked)

and put it at the very end

:L
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 12:42 PM
and you only need one end. ;P

:L
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Oct 2012 12:42 PM
Oh man I didn't see that, yeh that was the problem.
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 12:43 PM
>Oh man I didn't see that, yeh that was the problem.

*facepalm*

:L
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Oct 2012 12:44 PM
I was only playing attention to his variables. :l
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 12:46 PM
>I was only playing attention to his variables. :l

*facepalm*

:L
Report Abuse
ThatWhipperSnapper is not online. ThatWhipperSnapper
Joined: 11 May 2012
Total Posts: 1566
10 Oct 2012 12:50 PM
function onButtonClicked()
script.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0
local player = game.Players.LocalPlayer
if player == nil then return end
player.Character.Head.Size = Vector3.new(5,5,5)
player.Character.Head.face.Texture = "http://www.roblox.com/asset/?version=1&id=1100320"
mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
end

script.Parent.MouseButton1Click:connect(onButtonClicked)


It works in test,but on a Online Server? It kills me,Just doesnt make your head 5,5,5.
Report Abuse
ThatWhipperSnapper is not online. ThatWhipperSnapper
Joined: 11 May 2012
Total Posts: 1566
10 Oct 2012 12:51 PM
and your Teleport Script STILL doesn't work. I was told to use a LocalScript for it?
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 12:52 PM
< font face="Serif" ​>:L< /font ​>
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 12:54 PM
Well, duh. You have to use a localscript if you are going to use the .LocalPlayer property of Players.

:L
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Oct 2012 12:55 PM
Lol no use a normal script, it makes you way cooler.
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 12:56 PM
> Lol no use a normal script, it makes you look way cooler.

I use a normal script when I can, and only use a local script when the situation absolutely needs it.
Report Abuse
ThatWhipperSnapper is not online. ThatWhipperSnapper
Joined: 11 May 2012
Total Posts: 1566
10 Oct 2012 12:56 PM
Fixed it.
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 12:57 PM
Also, you guys both failed.

> char.CFrame = CFrame.new(Vector3.new(-303.1, 128.5, -40.19))


CFrame is it's own Vector.

    char.CFrame = CFrame.new(-303.1, 128.5, -40.19)
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 12:59 PM
>Also, you guys both failed.

I've never messed with CFrames :p

:L
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 01:00 PM
> CFrame is it's own Vector.

That is actually untrue. It uses Vector3, but you don't need to make a new Vector3 value for it.
Even if you did, it'd need three arguments, making 9 different positions, and henceforth, making an error.
Report Abuse
ThatWhipperSnapper is not online. ThatWhipperSnapper
Joined: 11 May 2012
Total Posts: 1566
10 Oct 2012 01:01 PM
^^^ Win
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
10 Oct 2012 01:03 PM
We lost Laekim.


Well maybe just you because honestly I only read the first line of the script and said it was fine,

lol.
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 01:05 PM
Did I ever say my script worked? I was just correcting what I saw. Idk how to use CFrames.

> > Also, you guys both failed.

> I've never messed with CFrames :p
:L

I never lose ;P

:L
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 01:07 PM
> > > Also, you guys both failed.
> > I've never messed with CFrames :p
:L
> I never lose ;P
:L

That only applies if you have the Forum Enhancer extension for Chrome. ;P
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 01:08 PM
How could I fail that badly with quotes? -.-
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 01:10 PM
> How could I fail that badly with quotes? -.-

lol - I had to preview mine first you have to do like

arrow arrow first quote
line break <--
arrow arrow second quote (2 boxes)

:L
Report Abuse
Laekim is not online. Laekim
Joined: 04 Oct 2012
Total Posts: 118
10 Oct 2012 01:11 PM
> > How could I fail that badly with quotes? -.-

> lol - I had to preview mine first you have to do like
arrow arrow first quote
line break <--
arrow arrow second quote (2 boxes)

Only one arrow for the first quote ​>.<

:L
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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