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: If you can help..[Camera Manipulation]

Previous Thread :: Next Thread 
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
29 Sep 2017 01:25 PM
I have made it so it rotates around a part when they join (pretty easy I know..) but I want it so when you click a TextButton it will stop. However just using what is below doesn't work (when in a MouseButton1Click function).

game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"

You should know the camera rotation script, if you don't just reply. Thanks.

#code print("this is secretly a bump")
Report Abuse
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
30 Sep 2017 01:38 AM
b

#code print("this is secretly a bump")
Report Abuse
szkiller_dev is not online. szkiller_dev
Joined: 07 Oct 2016
Total Posts: 3572
30 Sep 2017 01:49 AM
Any errors ?



Lua is my moon, Java is my coffee, Pascal is my dad, C++ is my grade 😎😎😎
Report Abuse
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
30 Sep 2017 01:52 AM
No apparently there is none :/

#code print("this is secretly a bump")
Report Abuse
emperormicah is not online. emperormicah
Joined: 31 May 2011
Total Posts: 3052
30 Sep 2017 01:57 AM
what are you using to make it rotate around a part? post source code
Report Abuse
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
30 Sep 2017 02:04 AM
In local script:

local target = workspace.Part
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
local angle = 0

while true do
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, 5) --Move the camera backwards 5 units
angle = angle + math.rad(1)
end

#code print("this is secretly a bump")
Report Abuse
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
30 Sep 2017 02:06 AM
And yes there is only one part named "part"

#code print("this is secretly a bump")
Report Abuse
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
30 Sep 2017 02:08 AM
(I found this on the wiki, that's why there are comments; I'm using this because my other one was buggy)

*And I meant "Part" not "part"

#code print("this is secretly a bump")
Report Abuse
HexagonCode is not online. HexagonCode
Joined: 09 Dec 2015
Total Posts: 1216
30 Sep 2017 03:15 AM
So it should stop rotating when you click on a TextButton?

Just make a event with TextButton.MouseButton1Down:Connect(function ()

end)
inside the while true do loop and when it got clicked break the loop so:

TextButton.MouseButton1Down:Connect(function ()
break
end)

I'm not sure if that works but it's something like that
Report Abuse
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
30 Sep 2017 03:17 AM
I'll try it thanks Hexagon.

#code print("this is secretly a bump")
Report Abuse
emperormicah is not online. emperormicah
Joined: 31 May 2011
Total Posts: 3052
30 Sep 2017 05:49 AM
local target = workspace.Part
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
local angle = 0

camerarot = game:service'RunService'.RenderStepped:connect(function()
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, 5) --Move the camera backwards 5 units
angle = angle + math.rad(1)
end)

--in the mousebutton1down

camerarot:disconnect()
Report Abuse
chloeb1 is not online. chloeb1
Joined: 28 Sep 2012
Total Posts: 2460
30 Sep 2017 05:50 AM
okay thanks

#code print("this is secretly a bump")
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