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: Help

Previous Thread :: Next Thread 
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
30 Dec 2016 10:59 PM
How do I make the camera focus on player once clicking a textbutton?
Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
30 Dec 2016 11:10 PM
bump
Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
30 Dec 2016 11:19 PM
bumpiedy bump bump bump
Report Abuse
GraphicsSettings is not online. GraphicsSettings
Joined: 12 Sep 2013
Total Posts: 2883
30 Dec 2016 11:20 PM
What exactly do you mean?
Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
30 Dec 2016 11:20 PM
so i have the camera rotating around a part i want it to when i click a textbutton the camera is on player normally.
Report Abuse
EraGamerBG is not online. EraGamerBG
Joined: 07 Jul 2011
Total Posts: 494
30 Dec 2016 11:22 PM
inside of a local script that's parent is the textbutton

local camera = workspace.CurrentCamera

local cameraSubject = camera.currentSubject

local button = script.Parent

button.MouseButton1Click:connect(function()
local players = game.Players:GetPlayers()

for i = 1,#players do
if string.lower(button.Text) == string.lower(players[i].Name) then
cameraSubject = players[i].Character.Head
end
end
end)





Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
30 Dec 2016 11:29 PM
currentSubject is not a valid memeber of player
Report Abuse
EraGamerBG is not online. EraGamerBG
Joined: 07 Jul 2011
Total Posts: 494
30 Dec 2016 11:30 PM
Oops, I made that mistake with the variable as I was typing it and didn't realize I made it when I defined it too. Changed currentsubject to CameraSubject


Report Abuse
Bylocks is not online. Bylocks
Joined: 27 Mar 2012
Total Posts: 773
30 Dec 2016 11:33 PM
its not working
Report Abuse
EraGamerBG is not online. EraGamerBG
Joined: 07 Jul 2011
Total Posts: 494
30 Dec 2016 11:38 PM
Errors? Wrote it off of the top of my head, so who knows what might've gone wrong lol.




Report Abuse
EraGamerBG is not online. EraGamerBG
Joined: 07 Jul 2011
Total Posts: 494
30 Dec 2016 11:48 PM
Oh uh this also assumes that the textbuttons text is the players name


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