I was testing stuff and tried to make an eye that keeps looking at me but stay in the same position always, so I used a BodyPosition to keep the eye in place, I set It’s P
to a very high number so I’m sure the ball will always stay in the same place.
Since I want it to follow the LocalPlayer I made a localscript inside StarterCharacterScripts for making the ball look at my character, in that script I make a BodyGyro with a CFrame so It’s looking at my character. (I’m doing this because I want a nicer and smoothy movement of the eye)
local Player = game.Players.LocalPlayer
local Character = script.Parent
local Root = Character:FindFirstChild("HumanoidRootPart")
local mouse = Player:GetMouse()
local RunService = game:GetService("RunService")
local EyeLook = game.Workspace:WaitForChild("EyeLook")
RunService.Heartbeat:Connect(function()
PlayerLookAt() -- For making my character move where my mouse is
EyeLookAt(EyeLook) -- For making the eye look at my character
end)
function EyeLookAt(part)
if not part:FindFirstChild("BodyGyro") then -- If part has no BodyGyro create it.
local BodyGyroII = Instance.new("BodyGyro")
BodyGyroII.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
BodyGyroII.P = 7000
BodyGyroII.CFrame = CFrame.lookAt(part.Position,Character.HumanoidRootPart.Position)
BodyGyroII.Parent = part
else
local BodyGyroII = part:FindFirstChild("BodyGyro") -- If part already has it then update it.
BodyGyroII.CFrame = CFrame.lookAt(part.Position,Character.HumanoidRootPart.Position)
end
end
The issue is:
When I join the game I have to get VERY close to the eye for it to look at me, as if there was a range/distance that I have to be in order for it to look at me, but the longer I stay in the game the more that range increases.
When the game starts It’s range is very low, but if I stay on it for long enough then It’ll be able to follow me for the entire map. This honestly makes no sense for me, all the script I’ve used is the one I’ve provided. PlayerLookAt() Works completly fine.
https://medal.tv/clips/47071457/d1337sPrI80O