|
| 11 Mar 2014 07:25 PM |
| I need a first person shooter script for my game, but i don't have a full grasp on how to make it. Help? |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Mar 2014 07:28 PM |
game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
i r teh pwnz0r! |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:29 PM |
| thank you! so all i do is make a script, and put this in it? |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:30 PM |
make a local script in starter gui
i r teh pwnz0r! |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:34 PM |
Or you could do: repeat script.Parent.Parent.CameraMode = "LockFirstPerson" until script.Parent.Parent.CameraMode == "LockFirstPerson
and place it in the StarterPack, though it might lag a little, it works. |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:34 PM |
So it will be...
starter GUI local script-then what you said |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:35 PM |
| thanks that works too, il try both |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:35 PM |
Oops typo,
repeat script.Parent.Parent.CameraMode = "LockFirstPerson" until script.Parent.Parent.CameraMode == "LockFirstPerson"
it would have to be normal not local though. |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:38 PM |
| ok, so i put that into a script, and put the script into starter gui? |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:39 PM |
or stortor p@ck
i r teh pwnz0r! |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 11 Mar 2014 07:41 PM |
repeat script.Parent.Parent.CameraMode = "LockFirstPerson" until script.Parent.Parent.CameraMode == "LockFirstPerson"
^Above will result in an infinite loop and crash.
Reason: no wait() Also CameraMode is an Enum |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Mar 2014 07:47 PM |
This is a mrore suffiecent way.
LFP = LockFirstPerson game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LFP |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 11 Mar 2014 07:48 PM |
Above wont work either
LFP = "LockFirstPerson" repeat wait() game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode[LFP] until LFP = LockFirstPerson game:GetService('Players').LocalPlayer.CameraMode == Enum.CameraMode[LFP]
That will. |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:54 PM |
^ That also won't work.
LFP = "LockFirstPerson" repeat wait() game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode[LFP] until LFP == "LockFirstPerson" -- Remember you need two "=" for repeat until loops. game:GetService('Players').LocalPlayer.CameraMode == Enum.CameraMode[LFP]
That will. |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 07:56 PM |
| They took my advice on shortening to LFP :) |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 08:27 PM |
| Thanks to all, but im confused. What will and wont work? |
|
|
| Report Abuse |
|
|
Korimon
|
  |
| Joined: 07 Aug 2013 |
| Total Posts: 56 |
|
|
| 11 Mar 2014 08:34 PM |
Hehe, another typo
LFP = "LockFirstPerson" repeat wait() game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode[LFP] until LFP == "LockFirstPerson" -- Remember you need two "=" for repeat until loops. game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode[LFP]
Its "=" not "=="
Above will work. |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 08:37 PM |
| yeah its hard and scripting is confusing. even dou i try my hardest to understand its too confusing |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 08:38 PM |
| some one i nee dhelp with this |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 08:49 PM |
(I'm assuming you want to be in first person mode when you spawn and not when you click something)
Ok so create a script:
Place the script in the StarterPack.
Put this into the script.
repeat wait(0.000001) script.Parent.Parent.CameraMode = "LockFirstPerson" until script.Parent.Parent.CameraMode = "LockFirstPerson
This will work as I have tried it before. |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 08:50 PM |
Yet I typo'd again,
Follow my last post and put this in the script.
repeat wait(0.0001) script.Parent.Parent.CameraMode = "LockFirstPerson" until script.Parent.Parent.CameraMode == "LockFirstPerson"
There. |
|
|
| Report Abuse |
|
|
| |
|