The script I made doesnt seem to be working, its about a mesh following you and facing you
It doesnt seem to be working and I get the error.
Workspace.NewPet.Script:12: Expected ‘)’ (to close ‘(’ at column 18), got ‘NewPet’
Here is the code its a script inside the Mesh
local NewPet = script.Parent NewPet.CanCollide = false
local PetPos = Instance.new("BodyPosition", NewPet)
local PetGyro = Instance.new("BodyGyro", NewPet)
PetGyro.MaxTorque = Vector3.new(400000,400000,400000)
local Owner = 'Kamcool435'
while(1) do
task.wait()
local OwnerObj = workspace:WaitForChild(Owner)
local OwnerPos = OwnerObj.HumanoidRootPart.Position
local StopAt = ((OwnerPos NewPet.Position) magnitude 5) * 1000
PetPos.P = StopAt
PetPos.Position = OwnerPos + Vector3.new(0,0,10)
PetGyro.CFrame = OwnerObj.HumanoidRootPart.CFrame
end
Does anyone know how can I fix this?