|
| 27 Jul 2017 05:46 PM |
I wanted to make a pet script which a part will follow me around the map but the script doesnt work for some reason??
repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character print("Pet Controller Loaded!")
function MovePet(pet, mode) local character = game.Players.LocalPlayer.Character local rpet = workspace[pet] local rmode = mode local inc = 0.7 if mode == true then -- If this is true then make the pet float. local base = character["Head"] else -- If its anything else other than true make the pet go on the ground. local base = character["Left Leg"] local dir = CFrame.new(rpet.Position, base.Position).lookVector print(dir) for i=0,10,2 do rpet.CFrame = rpet.CFrame + (dir * inc) wait(0.05) end end end
while wait() do MovePet("Pet", false) end |
|
|
| Report Abuse |
|