I'm trying to make a part's rotation face the player's mouse when the player holds down "w", and only on the Y rotation. It doesn't work, the output prints w is down, and the loop worked over and over again untill I stop pressing "w" , so those 2 work, but the part still doesn't rotation on Y to face the part!1 And it isn't because the "script.Parent.GetMousePosition.MousePosition.Value" isn't working, I put a print in that script too, and it DOES work.. Hellllp mee?
local Plr = game.Players.LocalPlayer
local Mouse = Plr:GetMouse()
local Car = game.Workspace:FindFirstChild(""..Plr.Name.."'s_Car")
local Speed = 5000000
local WIsDown = script.Parent.WScript.WIsDown
WIsDown.Changed:connect(function(Value)
if Value == true then
print("w is down")
local Force = Instance.new("BodyGyro")
Force.maxTorque = Vector3.new(0,Speed,0)
Force.D = 10000
Force.P = 10000
Force.Name = "TurnForce"
repeat
print("the loop worked")
wait(0.05)
Force.cframe = script.Parent.GetMousePosition.MousePosition.Value
until WIsDown.Value == false
Force:Destroy()
end
end)

4 comments
I'm usinf body gyro because this part is in a model, I need body gyro for what I'm making.
Using*
Omg I know what I did wrong now, I didn't give the force a parent lol, ty I would of not realized that without reading your code xd
Yw, lol.