smiley599Join Date: 2010-01-23 Post Count: 21869 |
local gyro = Instance.new("BodyGyro",torso)
gyro.maxTorque = Vector3.new(0,10000,0)
gyro.D = 100
gyro.P = 10000
while wait() do
neck.C0 = CFrame.new(neck.C0.p) * CFrame.Angles(-Camera.CoordinateFrame.lookVector.Y,0,0)
gyro.cframe = CFrame.new(torso.Position, Mouse.Hit.p)
end
How would i fix it because the head doesnt follow the mouse anymore? |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
Bump |
|
NyxisJoin Date: 2012-11-15 Post Count: 3374 |
The head follows the Camera not the head. It says 'Camera.CoordinateFrame.Y' |
|
NyxisJoin Date: 2012-11-15 Post Count: 3374 |
not the mouse* XD my bad lol |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
yeah typo ;)
so do you have any ideas? |
|
NyxisJoin Date: 2012-11-15 Post Count: 3374 |
Is that the entire script? e_e
It seems to be missing some obvious variables. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
No but the rest is irrelevant.
It worked before the update.
It's interesting how it only works once - it moves the head once then stops.
But the loop doesn't break. |
|
NyxisJoin Date: 2012-11-15 Post Count: 3374 |
well I went ahead and edited it to a working point. no issues for me.
wait()
Plr = game.Players.LocalPlayer
Camera = workspace.CurrentCamera
Mouse = Plr:GetMouse()
torso = Plr.Character.Torso
neck = torso.Neck
local gyro = Instance.new("BodyGyro",torso)
gyro.maxTorque = Vector3.new(0, 10000, 0)
gyro.D = 100
gyro.P = 10000
while wait() do
neck.C0 = CFrame.new(neck.C0.p) * CFrame.Angles(Camera.CoordinateFrame.lookVector.Y + math.pi/2, math.pi, 0)
gyro.cframe = CFrame.new(torso.Position, Mouse.Hit.p)
end |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
I'll try it when I get on my laptop!
Thank you for your effort! |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
It doesn't work? It only works once, like mine, and the head is in a random place. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
Wh |
|
NyxisJoin Date: 2012-11-15 Post Count: 3374 |
Unlikely story. Unless you're attempting to run it in a server-side script. It should be client-sided. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
It is a local script.
I should have mentioned I'm using a fake head to hide the player names.
I changed the variable names appropriately. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
bleh |
|
NyxisJoin Date: 2012-11-15 Post Count: 3374 |
|
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
I used the health/name display distances and kept the real head - thanks.
however i still get the same problem even with your script |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
I tested the script out on a different place and it worked there. Something must be doing something to it on my main game, meaning my orignal script worked too.
Thank you!:) |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
I found what script was breaking it.
Thank you for your help! |
|
NyxisJoin Date: 2012-11-15 Post Count: 3374 |
mk |
|