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
 

Local Script not working...

Previous Thread :: Next Thread 
Briicks is online. Briicks
Joined: 03 Apr 2015
Total Posts: 1796
27 Jan 2017 05:26 PM
So my game is FE and I know it has something to do with that but I'm not too sure why this isn't working.
It's suppose to go thru all the players in the game and see if they have a Model named Pet in their workspace character and if so make it look like their pet if following that user locally.

game:GetService("RunService").RenderStepped:connect(function()
for _,p in pairs(game.Players:GetChildren()) do
if workspace:FindFirstChild(p.Name) then
local Pl = workspace:FindFirstChild(p.Name)
if Pl:FindFirstChild("Pet") then
local Pet = Pl.Pet
Pet.BS.position = Pl.HumanoidRootPart.Position + Vector3.new(0,0.10,5)
Pet.BG.cframe = Pl.HumanoidRootPart.CFrame
Pet.CFrame = CFrame.new(Pet.CFrame.p,Cam.CFrame.p)
Pet.Anchored = false
end
end
end
end)

Report Abuse
Briicks is online. Briicks
Joined: 03 Apr 2015
Total Posts: 1796
27 Jan 2017 05:27 PM
BS = BodyPosition
BG = BodyGyro

Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
27 Jan 2017 05:37 PM
If your doing this for every player then this will cause huge amounts of lag. Roblox servers arent that goid lmao. Yoyr better off moving the pet in a localscript and firing the server the position of the pet.

You can use lerp to achieve smoother effects.
Report Abuse
Briicks is online. Briicks
Joined: 03 Apr 2015
Total Posts: 1796
27 Jan 2017 05:38 PM
This isn't for a game of mine, so I don't care how much lag it causes. It works when testing in studio, but not in game.

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