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 » Scripting Helpers
Home Search
 

Re: Trying to make a pet brick CFrame problems

Previous Thread :: Next Thread 
GRAGGER2001 is not online. GRAGGER2001
Joined: 05 Apr 2009
Total Posts: 2043
05 Jan 2014 02:44 PM
--The Player1 part is because i am testing it in solo.
--But it won't stay 5 studs behind and 5 studs above my torso.

plr=[[Player1]]--<--ONLY CHANGE THIS OR THE SCRIPT WILL NOT WORK!!
game:GetService('Players'):WaitForChild(plr)
char=game:GetService('Players')[plr].Character
head=char.Head
local p = Instance.new('Part',game.Workspace)
p.Name=plr.."'s Pet Brick"
p.Size=Vector3.new(4,4,4)
Instance.new('SpecialMesh',p).MeshType='Sphere'
p.TopSurface='Smooth'
p.BottomSurface='Smooth'
p.BrickColor=BrickColor.new('Really red')
p.Transparency=.5
p.CanCollide=false
p.Anchored=true
local screen=Instance.new("BillboardGui",p)
screen.Adornee = p
local name = Instance.new("TextLabel",screen)
name.Size = UDim2.new(0,200,0,200)
name.BackgroundTransparency = 1
screen.AlwaysOnTop = true
screen.Size = UDim2.new(0,200,0,200)
screen.StudsOffset = Vector3.new(0,2,0)
name.Font = "Legacy"
name.FontSize = "Size18"
name.TextStrokeTransparency = 0
name.TextColor3 = BrickColor.new('Really red').Color
name.Text=p.Name
local p2 = Instance.new('Part',p)
p2.Name='Inner Pet'
p2.Size=Vector3.new(2,2,2)
p2.Transparency=.5
p2.CanCollide=false
p2.Anchored=true
Instance.new('SpecialMesh',p2).MeshType='Sphere'
p2.TopSurface='Smooth'
p2.BottomSurface='Smooth'
i=1
dist = 5
for X = 1, math.huge, 0.1 do
i=i+1
p.CFrame = game.Players[plr].Character.Head.CFrame*CFrame.fromEulerAnglesXYZ(0,dist,5)
wait()
p2.CFrame=CFrame.new(p.Position)
end
Report Abuse
GRAGGER2001 is not online. GRAGGER2001
Joined: 05 Apr 2009
Total Posts: 2043
05 Jan 2014 02:48 PM
b1
Report Abuse
GRAGGER2001 is not online. GRAGGER2001
Joined: 05 Apr 2009
Total Posts: 2043
05 Jan 2014 02:54 PM
b2 btw if you help me I will give credit.
Report Abuse
GRAGGER2001 is not online. GRAGGER2001
Joined: 05 Apr 2009
Total Posts: 2043
05 Jan 2014 03:48 PM
b3
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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