ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 28 Oct 2012 04:10 PM |
player = script.Parent.Parent.Character
function clicked()
c = player.Torso:findFirstChild("Right Shoulder") c.DesiredAngle = 0.5 end script.Parent.MouseButton1Down:connect(clicked) ------------------------
T_T no worky. I'm checking output right now. |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 28 Oct 2012 04:13 PM |
Updated code:
player = script.Parent.Parent
function clicked()
c = player.Torso:findFirstChild("Right Shoulder") c.DesiredAngle = 0.5 end script.Parent.MouseButton1Down:connect(clicked)
I don't know the clicked function for tools |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 10:23 PM |
What you did wrong was you did not call the selected function then connect the click function like this.
function clicked(mouse)
c = game.Players.LocalPlayer.Character.Torso:FindFirstChild("Right Shoulder") if c then c.DesiredAngle = 0.5 end function finish(mouse) mouse.Button1Down:connect(function()clicked(mouse) end) end
script.Parent.Selected:connect(finish)
I hope that this helped :) --Blankscarface23 |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 11:31 PM |
Cleaning up blansarface's script
(in a local script)
script.Parent.Selected:connect(function(mouse) mouse.Button1Down:connect(function() pcall(function() game.Players.LocalPlayer.Character.Torso["Right Shoulder"].DesiredAngle = 0.5 end) end) end) |
|
|
| Report Abuse |
|
|