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: Copy FPS Script

Previous Thread :: Next Thread 
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 02:04 PM
Soo I think I found out my problem with my FPS script.. You need to copy the script when the player joins/respawn....
Worksapce
>script
>>LocalScript (FPSLock)

(script)

game.Players.PlayerAdded:connect(function(player)
script.Parent.Clone:("FPSLock") players.StarterGui
end

(LocalScript FPSLock)

game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson


So truth be honest I don't know how to clone something into your starterGui so the 2nd line was just a guess.. How close am I to being right?
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 02:11 PM
Regular Script (Child of Workspace):
----

    game.Players.PlayerAdded:connect(function(player)
        player.CharacterAdded:connect(function(char)
            script.FPSLock:clone().Parent = player.StarterGui
        end)
    end)


Local Script (Child of Regular Script)
----

    game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 02:19 PM
"StarterGui is not a member of player"

Why?

Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 02:20 PM
Whoops.

It's PlayerGui, not StarterGui. My fault.
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
10 Oct 2012 02:20 PM
It's PlayerGui.
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 02:22 PM
> It's PlayerGui.

Late post. ;D
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 02:33 PM
Thanks guys!
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 02:36 PM
Hmm... Still acts like all the others...

Respawn, scripts act like there set to Nil..

Thats what I've been trying to fix :l I just wish I knew how..

How would YOU fix the FPS Nil on respawn?
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
10 Oct 2012 02:53 PM
-.-'

Enable the LocalScript.
Place it into StarterPack.
Test.
???
Profit.
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 02:58 PM
> -.-'
Enable the Local Script
Place it into StarterPack
Test.
???
Profit.

And what happens when the "weapon" (script) is received before the character is loaded? It errors.
The cloning is a failsafe.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 03:00 PM
I uploaded the script to here:

http://www.roblox.com/RIP-Place-place?id=88847138

Works Perfect when you join the game.

Then just acts Nil when you respawn.
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
10 Oct 2012 03:01 PM
@Daelus, StarterGui add's stuff to the players PlayerGui when it's all loaded. It has a built in library to wait for that.
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 03:03 PM
> StarterGui add's stuff to the players PlayerGui when it's all loaded. It has a built in library to wait for that.

Both Backpack and StarterGui have failed me before.
Report Abuse
TehChikenHater is not online. TehChikenHater
Joined: 11 Jun 2012
Total Posts: 497
10 Oct 2012 03:03 PM
Try this...

game.Players.PlayerAdded:connect(function(Player)
repeat wait() until Player.PlayerGui --Wait until PlayerGui loads.
script["LocalScript"]:clone().Parent=Player.PlayerGui
Player.CharacterAdded:connect(function()
repeat wait() until Player.PlayerGui
script["LocalScript"]:clone().Parent=Player.PlayerGui
end)
end)
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
10 Oct 2012 03:07 PM
The two scripts I gave you work for me.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 03:11 PM
Same effect. At least it works perfectly in Studio..

Game mode.. Die and nothing, I've even added a wait(1) to the FPS part.

Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 03:12 PM
@ Daelus here tell me if this works for you..

http://www.roblox.com/FPS-Lock-item?id=94737821
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
10 Oct 2012 06:45 PM
Still waiting on that reply.. It just loads the FPSLock script once, then if you respawn the script is set to nil. (But it works perfectly in Studio.)
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