The script below used to work but Roblox broke it. Any help?
local t = script.Parent.Trainer.Value local g = Instance.new("BodyGyro",script.Parent) while wait() do local list = game.Workspace:GetChildren() for i = 1, #list do local n = list[i] if n.Name == t then local torso = n:FindFirstChild("Torso") script.Parent:WaitForChild("Pokemon"):MoveTo(torso.Position - (torso.CFrame.lookVector * 3),torso) g.cframe = CFrame.new(script.Parent.Torso.Position,torso.Position) end end end
This might not fix your error or it will. On line 10 you did "cframe" not "CFrame". Anyways this fixes one error maybe not all them but a upvote is appreciated.
What are you trying to do? What is 'script.Parent'? What is 'script.Parent.Trainer'? What is 'Pokemon'? We need more information.
Anyways, you could try using CFrame.new(startPosition,lookAt)
instead of a BodyGyro.