LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
|
| 23 Aug 2013 08:48 PM |
function Click() print 'click' end
script.Parent.MouseButton1Down:connect(Click)
Do you have to use that parent.parent.parent.parent.parent.... thing |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2013 08:49 PM |
| It depends, local script or not? |
|
|
| Report Abuse |
|
|
LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
|
| 23 Aug 2013 08:50 PM |
not
as you can see in a gui textbutton |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2013 08:52 PM |
| So if it's a normal script, then you will have to do .Parent.Parent.Parent etc |
|
|
| Report Abuse |
|
|
LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
| |
|
LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
| |
|
|
| 23 Aug 2013 08:53 PM |
| game.Players.LocalPlayer for ANY LocalScript. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 23 Aug 2013 08:55 PM |
| How do you like being superninja'd? |
|
|
| Report Abuse |
|
|
LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
|
| 23 Aug 2013 08:58 PM |
really so
function onClick() local clicker = game.Players.LocalPlayer clicker.Torso.CFrame = CFrame.new(Vector3.new(0, 50, 0)) end script.Parent.MouseButton1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
| |
|
LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
|
| 23 Aug 2013 09:01 PM |
explain further
clicker.Character.Torso.CFrame? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 09:02 PM |
If you still want regular script, and it's located somewhere under the player:
local Player = Game.Players[script:GetFullName():match("Players%.(.-)%.")] |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 09:03 PM |
CFrame.new(0, 50, 0)
No need for Vector3.new().
clicker.Character.Torso.CFrame = CFrame.new(0, 50, 0) |
|
|
| Report Abuse |
|
|
LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
|
| 23 Aug 2013 09:04 PM |
but without the vector3.new() wouldn't it kill the character?
|
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 09:05 PM |
| No. CFraming the part does not break welds. Positioning does. Or you could use clicker.Character:MoveTo(Vector3.new(0, 50, 0)) |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 09:05 PM |
| To, setting the Torso does not break joints, as the joints Part0 is the Torso. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2013 09:06 PM |
| @Cody: I am quite sure it only applies to parts whose Part0 is being moved, directly or indirectly. |
|
|
| Report Abuse |
|
|
LuaKid18
|
  |
| Joined: 01 Aug 2013 |
| Total Posts: 678 |
|
|
| 23 Aug 2013 09:06 PM |
you guys must have so much exp thanks |
|
|
| Report Abuse |
|
|