|
| 31 Jul 2013 05:48 PM |
[Left] I want the position to be -5.94, 3.04, 23.74 But it's set as 0.5, -0.30, -0.5
[Right] I want the position to be -4.43, 3.234, 24.785 But it's set as -0.5, -0.30, -0.5
How can I make it into those postions? |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 31 Jul 2013 05:49 PM |
You have a thread in Scripting Helpers.
Why did you post it here too? |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 31 Jul 2013 05:50 PM |
even though i haven't tested this out.
but i am pretty sure your arm will just be floating in midair with no rotation.
position ~= rotation |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2013 05:56 PM |
@xSIXx So here's the rotations: [Left] -100.182, -67.614, -44.916 [Right] -103.631, 11.769, 169.751
And here's the script for th eright arm, what do I do?
local c0 = nil local c1 = nil name = "Right" local s = nil local w = nil local t = nil local c = nil function Click(mouse) player = script.Parent.Parent.Parent char = player.Character if char ~= nil then torso = char:FindFirstChild("Torso") arm = char:FindFirstChild(name.." Arm") if torso ~= nil and arm ~= nil then shoulder = torso:FindFirstChild(name.." Shoulder") if shoulder ~= nil then c0 = shoulder.C0 c1 = shoulder.C1 s = shoulder:clone() shoulder.Parent = nil local weld = Instance.new("Weld") local yes = true if yes then yes = false w = weld t = torso c = char weld.Part0 = torso weld.Parent = torso weld.Part1 = arm weld.C1 = CFrame.new(-0.5, -0.30, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(40), 0, math.rad(45)) end end end end end function Unclick(mouse) w.Parent = nil s.Parent = t s.C0 = c0 s.C1 = c1 local ani = char:FindFirstChild("Animate") if ani ~= nil then local d = ani:clone() ani.Parent = nil wait() ani = d ani.Parent = c end end
function Select(mouse) mouse.Button1Down:connect(function() Click(mouse) end) mouse.Button1Up:connect(function() Unclick(mouse) end) end script.Parent.Selected:connect(Select) |
|
|
| Report Abuse |
|
|
Parthax
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 6941 |
|
|
| 31 Jul 2013 06:01 PM |
oh my god the inefficiency dont mind me while i go gouge my eyes out
cнecĸмαтe, ɴooвѕ. |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2013 06:19 PM |
| Come on, I just want help with updating the salute :/ |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 31 Jul 2013 06:25 PM |
| Seriously, why use one letter variables.... |
|
|
| Report Abuse |
|
|
| |
|
billiland
|
  |
| Joined: 11 Nov 2008 |
| Total Posts: 4018 |
|
|
| 31 Jul 2013 06:36 PM |
>"Seriously, why use one letter variables...."
Does not everyone do this? "for k,v in pairs({}) do"
k and v are variables... Most people use one letter variables and arguments. Though, I get your point. It makes it harder for a person who didn't create it to read, which is all fine and dandy, but you can guess based on context 99 percent of the time. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 31 Jul 2013 06:37 PM |
| I seldom use one-letter variables anymore |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2013 06:37 PM |
for Index, Value in pairs({}) do print(Index, Value) end
or for players/children
for Index, (Child/Player) in pairs(Players:GetPlayers()/Parent:GetChildren()) do end
thats what i do |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 31 Jul 2013 06:38 PM |
| Well, It's nice if you ever come back to that code after a lengthy period of time, and for cleanness as well, but that's my opinion. |
|
|
| Report Abuse |
|
|
billiland
|
  |
| Joined: 11 Nov 2008 |
| Total Posts: 4018 |
|
|
| 31 Jul 2013 06:42 PM |
| I tend to do it in certain conditions, as the one I stated above, |
|
|
| Report Abuse |
|
|
billiland
|
  |
| Joined: 11 Nov 2008 |
| Total Posts: 4018 |
|
|
| 31 Jul 2013 06:43 PM |
"for Index, Value in pairs({}) do print(Index, Value) end
or for players/children
for Index, (Child/Player) in pairs(Players:GetPlayers()/Parent:GetChildren()) do end
thats what i do"
See, I used to do that too. In fact, I still find myself doing it from time to time, but laziness has ruined me. I like to pretend I am challenging myself in the future. |
|
|
| Report Abuse |
|
|
| |
|
billiland
|
  |
| Joined: 11 Nov 2008 |
| Total Posts: 4018 |
|
|
| 31 Jul 2013 06:49 PM |
| Don't worry, you'll get there one day. |
|
|
| Report Abuse |
|
|
| |
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
|
| 31 Jul 2013 07:32 PM |
| Obviously not free models. |
|
|
| Report Abuse |
|
|
| |
|
129K
|
  |
| Joined: 23 Aug 2011 |
| Total Posts: 19010 |
|
|
| 31 Jul 2013 08:21 PM |
| [[for _, o in pairs({}) do]] > all |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 31 Jul 2013 08:31 PM |
sometimes for the sake of clarity:
for num, obj in pairs(something:GetChildren()) do
if num == 3 blah
if obj.Name == "hi" blah |
|
|
| Report Abuse |
|
|