|
| 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 |
|