Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by
yoshi8080 445 Moderation Voter
9 years ago

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

01local plr = game.Players.LocalPlayer
02local torso = plr.Character:WaitForChild("Torso")
03 
04while wait() do
05local objectSpace = CFrame.Angles(0, 0, -5)
06objectSpace = CFrame.new(-5, 0, 0)
07 
08local worldSpace = torso.CFrame:toWorldSpace(objectSpace)
09 
10local part = Instance.new("Part",workspace)
11part.Anchored = true
12part.CFrame = worldSpace
13part.CanCollide = false
14part.Size = Vector3.new(2,2,2)
15local sparkles = Instance.new("Sparkles",part)
View all 23 lines...

Any other way to not glitch the part?

1 answer

Log in to vote
0
Answered by
xuefei123 214 Moderation Voter
9 years ago

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

0
The pet is already placed in the player's model which is what the script says? yoshi8080 445 — 9y
Ad

Answer this question