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: How do i tweet the players camera's postion?

Previous Thread :: Next Thread 
SameySam is not online. SameySam
Joined: 22 Mar 2012
Total Posts: 11040
26 Dec 2016 07:42 PM
How do I smoothly (tween) the players camera's position using a gui?

it's inside a function such as this one;

script.Parent.MouseButton1Click:connect(function()
--code
end)


Report Abuse
j1my3p1x is not online. j1my3p1x
Joined: 16 Jan 2010
Total Posts: 978
26 Dec 2016 07:43 PM
http://wiki.roblox.com/index.php?title=Camera_manipulation
Report Abuse
juniorjfive is not online. juniorjfive
Joined: 05 Jan 2010
Total Posts: 671
26 Dec 2016 07:47 PM
The camera has a Tweening function. The camera type has to be scriptable in order for it to work though.

http://wiki.roblox.com/index.php?title=API:Class/Camera/Interpolate

ex: (Assuming it's a LocalScript)

local Camera = workspace.CurrentCamera
Camera.CameraType = "Scriptable"

script.Parent.MouseButton1Click:connect(function()
Camera:Interpolate(CFrame.new(0, 25, 0), CFrame.new(), 1)
end)
Report Abuse
SameySam is not online. SameySam
Joined: 22 Mar 2012
Total Posts: 11040
26 Dec 2016 07:47 PM
@j1

thanks that gives me a good idea of how it works.

anyone else got annythign to help?


Report Abuse
SameySam is not online. SameySam
Joined: 22 Mar 2012
Total Posts: 11040
26 Dec 2016 07:53 PM
@jun

and the script will know by using currentcamera to use the local players camera? (sorry ive never worked with camera's


Report Abuse
KittehCatten is not online. KittehCatten
Joined: 22 Jul 2012
Total Posts: 509
26 Dec 2016 07:55 PM
In a localscript, yes, you can refer to workspace.CurrentCamera to manipulate the local player's camera.


Report Abuse
juniorjfive is not online. juniorjfive
Joined: 05 Jan 2010
Total Posts: 671
26 Dec 2016 08:01 PM
what they said ^
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