• Games
  • Catalog
  • Develop
  • ROBUX
  • Search in People
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • ROBUX
   
ROBLOX Forum » Club Houses » Off Topic
Home Search
 

I need help with the script of my game

Previous Thread :: Next Thread 
User is not online. CorgiParade
Joined: -
Total Posts: -
-
27 Aug 2021 02:00 AM
The script is meant to make the camera focus on a player when he/she walks into it and then unfocus them when they walk out of it. Here's the script: if (game.Players.LocalPlayer.Character == nil) then return end local player = game.Players.LocalPlayer camera = workspace.CurrentCamera while wait() do wait(.1) local character = player.Character if (character ~= nil and character:FindFirstChild("Torso") ~= nil and character.Torso.Position - camera.CoordinateFrame.p >= 0.5 and character.Torso.Position - camera.CoordinateFrame.p <= 20 ) then camera.Focus = Vector3.new(character.Torso.Position.x, character.Torso.Position.y + 2, character.Torso.Position.z) wait(0.1) end end Please help me!


Report Abuse
User is not online. CorgiParade
Joined: -
Total Posts: -
-
27 Aug 2021 02:18 AM
Bump


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Off Topic
       
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Privacy

ROBLOX, "Online Building Toy", characters, logos, names, and all related indicia are trademarks of ROBLOX Corporation, ©2016. Patents pending. ROBLOX is not sponsored, authorized or endorsed by any producer of plastic building bricks, including The LEGO Group, MEGA Brands, and K'Nex, and no resemblance to the products of these companies is intended. Use of this site signifies your acceptance of the Terms and Conditions. This website is not affiliated with ROBLOX