|
| 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 |
|
|
|
| 10 Oct 2012 12:41 PM |
| This is nothing wrong with it at all. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 04 Oct 2012 |
| Total Posts: 118 |
|
|
| 10 Oct 2012 12:42 PM |
and you only need one end. ;P
:L |
|
|
| Report Abuse |
|
|
|
| 10 Oct 2012 12:42 PM |
| Oh man I didn't see that, yeh that was the problem. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 10 Oct 2012 12:44 PM |
| I was only playing attention to his variables. :l |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 06 Sep 2012 |
| Total Posts: 144 |
|
|
| 10 Oct 2012 12:52 PM |
| < font face="Serif" >:L< /font > |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 10 Oct 2012 12:55 PM |
| Lol no use a normal script, it makes you way cooler. |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
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
|
  |
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 06 Sep 2012 |
| Total Posts: 144 |
|
|
| 10 Oct 2012 01:08 PM |
| How could I fail that badly with quotes? -.- |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|