1191: Mouse.Move:Connect(function() wait() 1192: local Magnitude = (PrimaryPart.Position - Mouse.Hit.p).Magnitude 1194: if InWater and not WhiteList[UI.Hint.Text] and not Stats.CanSwim then UI.Hint.Visible = true UI.Hint.Text = "Jump or press Q to swim up!" elseif Mouse.Target then if (Mouse.Target.Parent.Name == "Edible" or Mouse.Target.Parent.Name == "Leaves") and Magnitude <= Stats.Range and (Stats.Diet == "Omnivore" or Stats.Diet == "Herbivore") and not WhiteList[UI.Hint.Text] then UI.Hint.Visible = true if not Mouse.Target:FindFirstChild("Leaf") then if Mouse.Target.Color ~= Color3.fromRGB(255, 176, 0) and Mouse.Target.Color ~= Color3.fromRGB(159, 161, 172) then UI.Hint.Text = "Click to eat." else UI.Hint.Text = "cant be eaten in this season" end else UI.Hint.Text = "Click to eat." end elseif (Mouse.Target.Parent.Name == "Corpse" or Mouse.Target.Name == "Bug" or string.find(Mouse.Target.Name, "Egg") or Mouse.Target.Parent.Name == "Tail") and Magnitude <= Stats.Range and (Stats.Diet == "Omnivore" or Stats.Diet == "Carnivore") and not WhiteList[UI.Hint.Text] then UI.Hint.Visible = true if Mouse.Target.Parent ~= workspace then if Mouse.Target.Parent:FindFirstChild("Meat") then UI.Hint.Text = "Click to eat. ("..Mouse.Target.Parent.Meat.Value ..")" end else if Mouse.Target:FindFirstChild("Meat") then UI.Hint.Text = "Click to eat. ("..Mouse.Target.Meat.Value ..")" end end please, help fix this bug.
We would need to see where is PrimaryPart defined, but sometimes can happen that the object of which PrimaryPart was defined could get replaced or deleted. Re-define PrimaryPart at line before 1192.