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 » Scripting Helpers
Home Search
 

Re: IK what must be done, just can't do it...

Previous Thread :: Next Thread 
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
30 Apr 2014 02:05 PM
[ Content Deleted ]
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
30 Apr 2014 02:13 PM
if game.Players.LocalPlayer.CameraMode == "LockFirstPerson" then
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
30 Apr 2014 02:13 PM
You need 2 equal signs in 'if statements'.
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
30 Apr 2014 02:18 PM
p = game.Players.LocalPlayer
FirstPerson = Enum.CameraMode.LockFirstPerson
Classic = Enum.CameraMode.Classic

script.Parent.Touched:connect(function(hit)
if p.CameraMode == FirstPerson then
p.CameraMode = Classic
else
p.CameraMode = FirstPerson
end
end)

idk why are you using this you should add a if to check if the part he touched is correct script like this will only make camera mode change awerytime player touches anything(if this is a local script inside player torso etc.)
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
30 Apr 2014 02:33 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
30 Apr 2014 02:54 PM
[ Content Deleted ]
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
30 Apr 2014 02:57 PM
output ?
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
30 Apr 2014 02:58 PM
p = game.Players.LocalPlayer

script.Parent.Touched:connect(function(hit)
if p.CameraMode == "LockFirstPerson" then
p.CameraMode = Enum.CameraMode.Classic
else
p.CameraMode = Enum.CameraMode.LockFirstPerson
end
end)
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
30 Apr 2014 03:07 PM
[ Content Deleted ]
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
30 Apr 2014 03:27 PM
p = Workspace.CurrentCamera
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
30 Apr 2014 04:52 PM
[ Content Deleted ]
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
30 Apr 2014 05:29 PM
script.Parent.Touched:connect(function(hit)
p = game.Players:GetPlayerFromCharacter(hit.Parent)
if p then
if p.CameraMode == "LockFirstPerson" then
p.CameraMode = Enum.CameraMode.Classic
else
p.CameraMode = Enum.CameraMode.LockFirstPerson
end
end
end)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
30 Apr 2014 09:41 PM
The camera is not inside the player.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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