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: Toggling player lock-on / camera lock-on to player

Previous Thread :: Next Thread 
Saevitiae is not online. Saevitiae
Joined: 07 Aug 2011
Total Posts: 149
10 Oct 2017 08:45 PM
How would I go about making a key toggle whether or not the camera goes from focusing on your character to the character of another? For instance you're a fighter free-roaming and when you encounter another fighter you press "Q" or something to toggle and direct your swings?

(Explanations to go along with a scripts are much appreciated but aren't required!)
Report Abuse
Saevitiae is not online. Saevitiae
Joined: 07 Aug 2011
Total Posts: 149
10 Oct 2017 08:58 PM
Anybody... Anybody at all.
Report Abuse
Pastures is not online. Pastures
Joined: 15 Aug 2015
Total Posts: 943
10 Oct 2017 08:58 PM
Basically this:

http://wiki.roblox.com/index.php?title=Camera_manipulation
Report Abuse
Saevitiae is not online. Saevitiae
Joined: 07 Aug 2011
Total Posts: 149
10 Oct 2017 09:29 PM
Yes, but how would I do that to another person? Like set the camera subject to another player?
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
10 Oct 2017 09:32 PM
if you just want your camera to lock on then you could do it this way

local RunService = game:GetService("RunService")

local Camera = game.Workspace.CurrentCamera
local Mouse = game.Players.LocalPlayer:GetMouse()

RunService.RenderStepped:Connect(function()
Camera.CFrame = CFrame.new(Camera.CFrame.p,Mouse.Target)
end)


Need Help With scripting or Hire Scripters? Go here! via Discord : discordDOTgg/rfnudw6
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