Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The BodyGyro doesn't do anything and no errors are showed up. Why?

Asked by 7 years ago

So I want to make the player face a Part in workspace. I tried with Body Gyro but it doesn't do anything, although there are no errors in the Output. Any ideas why?

This is the code:

local g = Instance.new("BodyGyro")
            g.Parent = character.Torso
            g.CFrame = CFrame.new(Vector3.new(character.Torso, workspace.Point))
            wait(1)
            g.Parent = nil
0
instances cant give errors Corexty 15 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Try the script below Now the player will look to that part. Succes! Jonas

character.HumanoidRootPart.CFrame = CFrame.lookVector(part.Position)

0
Doesn't work: attempt to call field 'lookVector' (a nil value) bruceywayne 35 — 7y
Ad

Answer this question