Hey everyone i am creating a fps but i have little knowledge of everything
can someone explain to be how to make them? I know that it will be very hard but an example would be fine like can you use... What im trying to make is a first person shooter like phantom forces with reloading animations shooting animations aiming animations but its confusing and in the game you can change your primary, secondary! -------------MENU SETUP FOR THE GAME!---------------------- http://prntscr.com/7flshr ------------MENU SETUP FOR THE GAME!------------------------
mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key) if key:byte() == KEY YOU WANT then WHAT YOU WANT TO HAPPEN end end
this script is very old and roblox had alot of updates and i dont know how to work it anymore. but works fine (AS IN VERY NOT SMOOTH!)~~~~~~~~~~~~~~~~~
THIS IS MY OLDER FPS SCRIPT! I NEED HELP ANYONE WANT TO HELP ME?---------------------------------------------
framework = workspace['framework'] resources = game.Lighting.resources
local settings = { right_cf = CFrame.new(-1, 1, -0.2) * CFrame.Angles(math.rad(-3), math.rad(-1), math.rad(0)); left_cf = CFrame.new(0.4, 1.2, .8) * CFrame.Angles(math.rad(-12), math.rad(30), math.rad(0));
ammo = 30; max_ammo = 120;
}
local player = game.Players.LocalPlayer local character = player.Character local camera = workspace.CurrentCamera local mouse = player:GetMouse()
local hud = player.PlayerGui.HUD
local aiming = false local reloading = false local sprinting = false local shooting = false local changing = false local esc = true
local arms = {character['Right Arm'], character['Left Arm']} local welds = {} local localarms = {}
local delta = 0.05 local mouseSensitivity = script.Parent.sensitivity.Value local mouseSensitivityOffset = 0 local firemode = 1
local tween_c1 = function(weld, frames, time, from, to) weld.C1 = from local T_F, Ang_Dif, Last_Pos = time * frames, Vector3.new(to:toEulerAnglesXYZ()) - Vector3.new(from:toEulerAnglesXYZ()) for i = 1, T_F do local Ang = Vector3.new(from:toEulerAnglesXYZ()) + (Ang_Dif/T_F * i) Last_Pos = CFrame.new(from.p + ((to.p - from.p)/T_F * i)) * CFrame.Angles(Ang.x, Ang.y, Ang.z) weld.C1 = Last_Pos wait(time/frames) if weld.C1 ~= Last_Pos then return end end weld.C1 = to end
local tween_c0 = function(weld, frames, time, from, to) weld.C0 = from local T_F, Ang_Dif, Last_Pos = time * frames, Vector3.new(to:toEulerAnglesXYZ()) - Vector3.new(from:toEulerAnglesXYZ()) for i = 1, T_F do local Ang = Vector3.new(from:toEulerAnglesXYZ()) + (Ang_Dif/T_F * i) Last_Pos = CFrame.new(from.p + ((to.p - from.p)/T_F * i)) * CFrame.Angles(Ang.x, Ang.y, Ang.z) weld.C0 = Last_Pos wait(time/frames) if weld.C0 ~= Last_Pos then return end end weld.C0 = to end
weld_a = function(a) if a:IsA("BasePart") or a:IsA("UnionOperation") then local W = Instance.new("Weld") W.Parent = a W.Part0 = accoutrement.Handle W.Part1 = a W.C0 = accoutrement.Handle.CFrame:inverse() * CFrame.new(accoutrement.Handle.Position) W.C1 = a.CFrame:inverse() * CFrame.new(accoutrement.Handle.Position) a.Anchored = false else local x = a:GetChildren() for v = 1, #x do weld_a(x[v]) end end end
------------------THAT IS ALL I WILL GIVE OF MY SCRIPT!-------------
Closed as Too Broad by FearMeIAmLag
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?