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
 

Help me fix this please.

Previous Thread :: Next Thread 
ManiacRoblox1234 is not online. ManiacRoblox1234
Joined: 23 Mar 2012
Total Posts: 123
29 Dec 2013 08:46 PM
Hey guys, I have a script here that is suppose to teleport players to the play area from the lobby as well as locking them in first person view and giving them a gun.

However, the lock first person view only works the first time when they are teleported, after dieing and going back to the lobby to get teleported back to the play area, it teleports but does not locks in first person view.

Also, the gun giving thing is not working. Please help me.

Here's my script:

Dest = {game.Workspace.PartD.Position, game.Workspace.PartE.Position, game.Workspace.PartF.Position}

function onTouch(hit)
plr = hit.Parent -- Get the person who hit the brick
if plr:FindFirstChild("Humanoid") ~= nil then -- Check it there is a Humanoid
plr:MoveTo(Dest[math.random(1,#Dest)]) -- Move the player's model to the part.
wait(1) -- Wait
game.Players:GetPlayerFromCharacter(plr).CameraMode = "LockFirstPerson" -- Lock the player' camera in First Person
wait(1) -- Wait
wep = game.Lighting.MK23
wep:clone().Parent = game.Players:GetPlayerFromCharacter(plr).BackPack
end -- End
end -- End
script.Parent.Touched:connect(onTouch) -- Connection line.
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