FPS using ViewModels (The improved version) // Parts: 2 out of 3

If you want to use custom arms that means you would also use custom animations, you can have a model of that ViewModel in ReplicatedStorage and whenever the script loads it will clone that model instead of the player’s character, you would also have to make your script play animations on both the player’s character and the ViewModel because the automatic animation replication in the current script won’t work since they are different models, if you want to use R6 ViewModels on R15 players though (Like arsenal does) you can also have an arms model in ReplicatedStorage, but instead of setting the CFrame of the ViewModel in your script you set the CFrame of the gun and place the arms in their grip positions.

1 Like

Appreciate you making this awesome tutorial! Was just wondering when we can expect part 3?

Honestly I thought the tutorial has died for a while but since it’s coming back up I’ll probably start working on part 3.

Very cool, will look forward to part 3!

Is part 3 still in the works, when can we expect it?

1 Like

The tutorial is really nice! I really like how concise it was. It was really easy for me to understand it! Nice Job!

Sorry I’ve just been inactive on the devforum and after thinking about it, the tutorial is already not that good since the ViewModels don’t look quite good and have bad coding, plus Aim down sights will even make it worse.

At this point you should’ve understood the basics of a viewmodel and all I can suggest is looking for a more advanced tutorial, I suggest learning about springs, humanoids, animations, etc…

I don’t think I’ll ever make part 3.

You could also use the HumanoidDescription | Roblox Creator Documentation for body colors

Hi there, thanks for the tutorial. Just need a bit of help though, the actual characters arms won’t be transparent(not the viewmodels arms) when equipping the tool. It shows both the actual arms and the view models arms.

put a local script in startergui or smthn and add this code

local player = game.Players.LocalPlayer
local char = player.Character
local RunService = game:GetService("RunService")

char:WaitForChild("Humanoid").CameraOffset = Vector3.new(0, -.2, -1.1)

for i, v in pairs(char:GetChildren()) do
	if v:IsA("BasePart") and v.Name ~= "Head" and v.Name ~= "Left Arm" and v.Name ~= "Right Arm" then

		v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
			v.LocalTransparencyModifier = v.Transparency
		end)

		v.LocalTransparencyModifier = v.Transparency

	end
end

RunService.RenderStepped:Connect(function(step)
	local ray = Ray.new(char.Head.Position, ((char.Head.CFrame + char.Head.CFrame.LookVector * 2) - char.Head.Position).Position.Unit)
	local ignoreList = char:GetChildren()

	local hit, pos = game.Workspace:FindPartOnRayWithIgnoreList(ray, ignoreList)

	if hit then
		char:WaitForChild("Humanoid").CameraOffset = Vector3.new(0, 0, -(char.Head.Position - pos).magnitude)
	else
		char:WaitForChild("Humanoid").CameraOffset = Vector3.new(0, -.2, -1.1)
	end
end)

Thanks. I found out that it was a viewable arms local script that I had inputed earlier. Thank you though for the kind script. I although am facing another issue, where the tool with the ViewModel will be randomly removed. I can’t seem to find the problem, but shortly after equipping it will despawn.

if you have meshes or somethings like that, add weld constraints to the handle and link it to every single part on the tool and turn off collisions and anchors

I know you dont awnser questions anymore but for anyone else in the Comments the ViewModel isnt showing up for me whenever I Clone it. I even tried changing from script.Parent to the LocalPlayers Character and nothing

Hmm, there is a problem, when you play on high FPS, the recoil gets worse, I am trying to fix it by myself.

bro honestly the whole point of making it begineer is redundant when majority of starting things could have been done w/o coding. for example, store the animation in the tool rather than writing lines to make it.

how do you make custom viewmodel (i mean arms that is from player’s arms)

The whole point is to present a tutorial for beginners into more advanced gun systems, not beginners into gun systems in general.

1 Like

this worked and thank you however, some instructions were unclear such as which script to write on and some methods you used were depricated but i still got it working eventually.

thanks normal weld wasnt working for me

You can use DeltaTime to fix that, I haven’t used it much so I don’t really know anything about it but I know it’s used for problems like that

Using DeltaTime - Resources / Community Tutorials - Developer Forum | Roblox