generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Could someone please fix this script?

Previous Thread :: Next Thread 
diablotoken is not online. diablotoken
Joined: 04 Jan 2012
Total Posts: 53
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image