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

My pet following script won't work! Only the main part will follow me not the legs! Please help?

Asked by
edwisc 1
3 years ago

So I made a script that makes the pet follow you but I made this differently to others. My current script is:

local Done = script.Parent local MainFrame = script.Parent.Parent local player = game.Workspace:WaitForChild(game.Players.LocalPlayer.Name) local pet = game.Workspace.Pet.Pet

Done.MouseButton1Click:Connect(function()
repeat wait(.000001) pet.Position = player.HumanoidRootPart.Position + Vector3.new(0,5,2)until nil MainFrame.Visible = false
end)

But I also have legs inside my pet so every time i press the 'Done' button only the body follows me not the pet! Please help

2 answers

Log in to vote
0
Answered by 3 years ago

It's simple! You don't need to script the rest. Just weld the other parts of the pet using this plugin: https://web.roblox.com/library/263025420/Welder You could also use weld constraints. Hope this helps!

Ad
Log in to vote
0
Answered by
Gogulsky 129
3 years ago

Use weldconstrants to weld with the "main part" and it should work.

0
I've done differently meaning even when welded it does not work :/ edwisc 1 — 3y

Answer this question