|
| 31 May 2013 07:23 PM |
I have an animation script that makes your "Right Arm" Follow the cursor. I made a flashlight but the point-light is rather bumpy when looking around.
Maybe its something wrong with the scripts or Roblox in general?
Well here is the animation arm script.
wait() Tool=script.Parent CP,Torso,g=nil,nil,nil necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) getPos=function(Pos,TorsoPos) return Vector3.new(Pos.x,TorsoPos.y,Pos.z) end Turn=function(mouse,Torso,Gyro) g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position)) offset=(Torso.Position.y-mouse.Hit.p.y)/100 mag=(Torso.Position-mouse.Hit.p).magnitude/80 offset=offset/mag neck=Torso.Neck neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0) arm=Torso:FindFirstChild("Right Shoulder") if arm~=nil then arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, -6.48200512e-007, 1.00000274, 0, -1.00000274, -6.48200512e-007, 0)*CFrame.fromEulerAnglesXYZ(0,0,-offset) end end Equi=function(mouse) wait(.2) CP=Tool.Parent Torso=CP.Torso g=Instance.new("BodyGyro") g.P=18000 g.D=600 g.maxTorque=Vector3.new(80000,80000000,80000)*50000000000000000000000000 g.cframe=Torso.CFrame g.Parent=Torso while true do if Tool.Parent.className~="Model" then break end Turn(mouse,Torso,g) wait() end Torso.Neck.C0=necko g:Remove() end Tool.Equipped:connect(Equi) |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:24 PM |
Here is the Pointlight Property Settings.
Angle: 70 Brightness:2 Color: 255,255,255 Enabled = true Range:20 |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:28 PM |
Bump.
How would I make it much Smoother? |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:34 PM |
It's how lighting works, has nothing to do with scripting.
Sorry. |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:36 PM |
| You might be able to make it so that it constantly removes the light and creates a new pointlight, but I can't guarantee that working. |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:38 PM |
| @marcopolo444 That could make it flash just some, and it may not even help. |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:41 PM |
the lighting system doesn't update fast enough right now, nothing to do with scripting
~Shadow~ |
|
|
| Report Abuse |
|
|
Figure65
|
  |
| Joined: 23 May 2007 |
| Total Posts: 2663 |
|
|
| 31 May 2013 07:41 PM |
what marcopolo said actually could be a good idea
it removes the pointlight and adds a new one every () seconds if it was fast enough, it wouldn't just flash, it might just auto update so fast that it would look natural |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:43 PM |
-- like this?
while true do wait(0.02) a = Instance.new("PointLight").Parent = game.Workspace.Part wait() a:remove() end |
|
|
| Report Abuse |
|
|
Figure65
|
  |
| Joined: 23 May 2007 |
| Total Posts: 2663 |
|
|
| 31 May 2013 07:46 PM |
or like this
while true do script.Parent.PointLight:Remove wait() Instance.new("PointLight", script.Parent) wait() end
if that script goes fast enough, it shouldn't look like it's flickering |
|
|
| Report Abuse |
|
|
|
| 31 May 2013 07:47 PM |
| But that would be incredibly inefficient. |
|
|
| Report Abuse |
|
|
Figure65
|
  |
| Joined: 23 May 2007 |
| Total Posts: 2663 |
|
|
| 31 May 2013 07:50 PM |
i'm not sure if you're calling marco's idea inefficient, but if you are, i agree
it would be ineffecient and probably lag a bit on slower computers but that might be a way around OP's problem |
|
|
| Report Abuse |
|
|
| |
|