|
| 20 Feb 2014 05:20 PM |
Cam = game.Workspace.CurrentCamera Char = game.Players.LocalPlayer.Character
Cam.Changed:connect(function() Char.Head.Weld.C0 = (CFrame.new(1, -1, -1) * CFrame.Angles(0, 1.57, 0)) * Cam.CoordinateFrame end)
There are no errors, it's just that the C0 property of the weld is being set so that the gun is positioned elsewhere in workspace instead of at (CFrame.new(1, -1, -1) * CFrame.Angles(0, 1.57, 0))
I thought that (* Cam.CoordinateFrame) would cause the gun to angle in the direction of the camera but instead it's positioning it. I dunno what to do now. It's all going down the toilet from here. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Feb 2014 05:54 PM |
Cam = game.Workspace.CurrentCamera Char = game.Players.LocalPlayer.Character
Cam.Changed:connect(function() Char.Head.WWeld.C0 = (Cam.CoordinateFrame - Cam.CoordinateFrame.p) end)
I tried it this way and while it does work (sort of) when the camera is zoomed out, it does not work when it is zoomed in.
When the camera is zoomed in, the C0 property is rotated faster than the camera is.
Why did i say sort of? Well, because the C0 property rotates the same speed when zoomed out, but ONLY lines up if you zoom in and line the part up with the camera. Otherwise if you zoom in and the part is facing right, it stays facing right when you zoom out and rotate.
Idk what to do now.
All I want is for the part to be first person and always face the direction of the camera like the guns in Battlefield do. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
| 21 Feb 2014 12:07 AM |
I don't really DO cameras..so..best thing I can do for u sadly is: Bump! Honestly,someone must know how to do this |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 12:25 AM |
it's not that they don't know how but rather that 1) Im not too well liked here in the forums and 2) i dont express my gratitude as often as i should when they do help.
I really am trying to change and be a better person but its hard when nobody gives u the chance lol.
anyway, bump. |
|
|
| Report Abuse |
|
|
| |
|
iYoshiFox
|
  |
| Joined: 14 Apr 2012 |
| Total Posts: 1058 |
|
|
| 21 Feb 2014 01:51 AM |
So ur trying to get le gun to follow ur cam? XD
Cam.Changed:connect(function() local pos = CFrame.new(1, -1, -1) * CFrame.Angles(0, 1.57, 0) Char.Head.Weld.C0 = CFrame.new(pos.p, Cam.Focus.p) end)
--Try dat. :P |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 10:35 AM |
| lol now it dont move at all xD |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Feb 2014 03:31 PM |
go to scripters forum for some reason people here just tell you to get out |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 03:31 PM |
Bump,do people on this forum seriously hate you or something? Bump Bump Bump Bump FIRIN MAH SUPER EPIC LAZER-BUMP |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 03:32 PM |
Nu-uh,This Does NOT go to scripting forums.. This is scripting helpers where it should be.. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 21 Feb 2014 05:10 PM |
This is sad.. Ik what to do tho(maybe):D Repost this thread and name it"this gun/cam script isn't working?help!" And since name is diffrent,maybe they'll help ?:3 |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 05:31 PM |
i s'pose it's worth a try but i can almost guarantee you the result will be the same.
you know ive gotten help faster on scripts that were too large to post in the forums? this is rediculous lol. its like all the smart people packed up and just left cuz roblox is like gonna s'plode or somethin lol |
|
|
| Report Abuse |
|
|