Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I CFrame the pet so it won't glitch from being removed?

I made the pet follow the player, it it glitches since I remove it. Any other way to fix this?

local plr = game.Players.LocalPlayer
local torso = plr.Character:WaitForChild("Torso")

while wait() do
local objectSpace = CFrame.Angles(0, 0, -5)
objectSpace = CFrame.new(-5, 0, 0)

local worldSpace = torso.CFrame:toWorldSpace(objectSpace)
 
local part = Instance.new("Part",workspace)
part.Anchored = true
part.CFrame = worldSpace
part.CanCollide = false
part.Size = Vector3.new(2,2,2)
local sparkles = Instance.new("Sparkles",part)
sparkles.SparkleColor = Color3.new(144,25,255)
local mesh = Instance.new("SpecialMesh",part)
mesh.TextureId = "http://www.roblox.com/asset/?id=83992632"
mesh.MeshId = "http://www.roblox.com/asset/?id=84003494"
mesh.Scale = Vector3.new(1,1,1)
wait(.1)
part:Destroy()
end

Any other way to not glitch the part?

1 answer

Make the pet's parent not the character, but workspace, or the player model in workspace

1 comment

0

The pet is already placed in the player's model which is what the script says?

This discussion is preserved as it was. New answers, comments, and votes are closed.