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
 

Re: one question or two....

Previous Thread :: Next Thread 
Dank_Skoped is not online. Dank_Skoped
Joined: 17 Aug 2016
Total Posts: 1
18 Nov 2016 10:51 AM
dear personalityless nerds,

When I have my menu of the planets in my game,
The user/player is supposed to be able to click on the planets.
When they do click on the planets, the camera is supposed to move and lock
onto the clicked planet. The game loads in on the starting planet, "Earth", but in the game the camera doesn't lock onto the other planets when clicked. Instead it stops following Earth and stops where-ever it is.

May you brainiacs help me?

I'm not gonna bother giving you the script to fix it because it will give you a headache of deoptimization OCD because im a nub.

My script is based around:

while wait() do -- Orbit loop
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(0, angle, 0) --Rotate by the angle
* CFrame.new(0, 0, 8) --Move the camera backwards 8 studs
angle = angle + math.rad(1)
end
end)

Mind my edgy username because I just realized i'm writing on my phantom forces account.
I have this thread tracked on my main "CharcoalBurns".
Any PM's, follow and write me on that account.
kthx
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
18 Nov 2016 10:53 AM
Instead of doing while wait() use the RunService

Do something like

run = game:GetService("RunService")

run.Heartbeat:Connect(function()
camera.CoordinateFrame = CFrame.new(target.Position) * . .
end)

When clicking on another planet, are you change the target?
Report Abuse
CharcoalBurns is not online. CharcoalBurns
Joined: 09 Jul 2014
Total Posts: 30
18 Nov 2016 10:56 AM
Yes when I click another planet it changes the camera target but the camera stops whereever it is instead.
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
18 Nov 2016 10:57 AM
Have you tried using RunService?

Anyways I have a script like this but I'm not home right now so I can't exactly help you 100%.
Report Abuse
CharcoalBurns is not online. CharcoalBurns
Joined: 09 Jul 2014
Total Posts: 30
18 Nov 2016 10:59 AM
No I haven't...

I will in a minute after I clear things up..

...

get home faster plz
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
18 Nov 2016 11:00 AM
I'm at school lmao won't get home until 1:00. It's 9 here.
Report Abuse
CharcoalBurns is not online. CharcoalBurns
Joined: 09 Jul 2014
Total Posts: 30
18 Nov 2016 11:03 AM
if u do homeschool u can do what-ever the # ### want as long as you keep up with pace and get good grades. You're own pace if you wan't I recommend Florida virtual schools free if inside of florida == true free if outside of florida == false Thx for trying to help!
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
18 Nov 2016 11:04 AM
No problem. If you still didn't find your answer by the time I get home, I'll try and help.
Report Abuse
CharcoalBurns is not online. CharcoalBurns
Joined: 09 Jul 2014
Total Posts: 30
18 Nov 2016 11:06 AM
ok.
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