Live Roblox Scripting Tutorials Part 3 - First Person Shooters

Channel:
Subscribers:
2,110
Published on ● Video Link: https://www.youtube.com/watch?v=tIaYUL89MqM



Roblox
Game:
Roblox (2006)
Category:
Tutorial
Duration: 16:32
300 views
11


In this tutorial, we learn how to make a class system, as well as how to lock the camera to first person for an FPShooter.

Camera Reset on Death Script:
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
char.Humanoid.Died:connect(function()
player.CameraMode = Enum.CameraMode.Classic
end)
end)
end)

Class Changer Script:
local event = game:GetService("ReplicatedStorage").ChangeClass
event.OnServerEvent:connect(function(player, class)
local class = game:GetService("ServerStorage"):FindFirstChild(class)
local guns = class:GetChildren()
for _, gun in ipairs(guns) do
gun:Clone().Parent = player.Backpack
end
player.CameraMode = Enum.CameraMode.LockFirstPerson
end)

LocalScript in the Buttons:
local event = game:GetService("ReplicatedStorage").ChangeClass

script.Parent.MouseButton1Down:connect(function()
event:FireServer(script.Parent.Name)
script.Parent.Parent:Destroy()
end)

Be sure to follow me on Twitter after subscribing!
https://twitter.com/Rrrrry123

Also, follow me on Twitch for some live streams!
http://www.twitch.tv/Rrrrry123







Tags:
Rrrrry123
RyGuyGaming
Ryan
Roblox
Minecraft
Runescape
PS
PlayStation
Let's
Play
Talk
Nostalgia
HTML
Script
Tutorial
Web
design
Lua
help
Dark
Souls
Destiny
Xbox
Scripting
Gaming
FPS
First person shooter
Lock camera
classes
system
class
army
guns
different
spawn



Other Statistics

Roblox Statistics For RyGuyGaming

At present, RyGuyGaming has 459,946 views spread across 106 videos for Roblox, and roughly a days worth of Roblox videos were uploaded to his channel. This makes up 17.76% of the content that RyGuyGaming has uploaded to YouTube.