|
| 09 Jul 2014 02:18 PM |
If you have ever played BATTLEFIELD by DeadzoneZackZack you know the game is first person... I Have a Script that makes it first person but I can't move the gun up and down... only side to side... I can still look up and down though... Any way to fix this?
The script for first person script.Parent.Parent.CameraMode = ("LockFirstPerson") |
|
|
| Report Abuse |
|
|
| |
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 09 Jul 2014 02:34 PM |
Wow, two of the same concepts right after the other in this subforum.
Here's an explanatory image (Hosted on lmgur) on how to find the angle: /Ffz3NQr.png
Now, just use that to set the C1 of the shoulder(s) on a loop. |
|
|
| Report Abuse |
|
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 09 Jul 2014 02:41 PM |
| Uh ok I don't want to retype everything I explained in the image... it's just an image hosting website but whatever |
|
|
| Report Abuse |
|
|
robotmega
|
  |
| Joined: 16 May 2009 |
| Total Posts: 14084 |
|
| |
|
|
| 09 Jul 2014 02:57 PM |
i know what it is i dont want to create an account
|
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 02:58 PM |
| what is the welds Part0 and Part1? |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 09 Jul 2014 03:00 PM |
| You don't have to create an account but it wouldn't matter because that image just explains the math to you and I can see you don't know how to implement it. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 03:08 PM |
I implemented it and this is the error I got:
16:04:50.350 - Players.Player1.Backpack.Pistol.ShoulderWeld:11: bad argument #3 to 'C1' (CFrame expected, got number)
This is the script:
local plr = Game.Players.LocalPlayer local head = plr.Character.Head local mouse = plr:GetMouse() local angle = math.asin( (mouse.Hit.p - head.Position).unit.Y ) local leftshoulder = Game.Players.LocalPlayer.Character.Torso:WaitForChild("Left Shoulder") local rightshoulder = Game.Players.LocalPlayer.Character.Torso:WaitForChild("Right Shoulder")
while true do if leftshoulder and rightshoulder then leftshoulder.C1 = angle rightshoulder.C1 = angle end end
Any Help.. Please I have been working on this all day and I'm tired of it |
|
|
| Report Abuse |
|
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 09 Jul 2014 03:18 PM |
'angle' is a number C1 is a CFrame
You're trying to say
CFrame = number
which makes no sense.
Here's my implementation of it I made a while ago:
http://www.roblox.com/Move-arm-and-neck-item?id=165507770 |
|
|
| Report Abuse |
|
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 09 Jul 2014 03:57 PM |
| Maybe not online but it works for me in studio which means the principles are correct. Read the script, learn how it works, and write your own that does work. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 04:38 PM |
| Your script works but since i have one arm welded to another it makes me do the worm |
|
|
| Report Abuse |
|
|
| |
|