FPS Viewmodel not working

I replied with what he should do here too.

1 Like

Don’t worry mate, he legit forgot to parent it in the first place.

1 Like

Yeah, I tried welding, but it doesn’t seem to work.

local weld = Instance.new("WeldConstraint")
weld.Part0 = character.Head
weld.Part1 = viewModel.Head
weld.Parent = character.Head
1 Like

Oh yeah that too

1 Like

I think your welds do actually work, however, like I mentioned, you have not parented it. You shouldn’t need to weld it either, if you’re updating the CFrame every RenderStepped.

1 Like

I’ve parented it to game.Workspace.CurrentCamera

Result:

1 Like

Does it at least move around with your camera, if not, then something else must be wrong OR you still have your weld still inserted in there.

1 Like

I suggest to parent the viewmodel to the player’s character and then set it’s CFrame to the player’s character HumanoidRootPart CFrame every RenderStepped…

2 Likes

It doesn’t move, I also removed the weld.

1 Like

That’s not what he’s attempting to achieve, he’s trying to make an FPS viewmodel, not a 3rd Person one. Parenting to CurrentCamera and changing CFrames then will suffice.

1 Like

Ok but FPS = FIRST PERSON shooter so he should set the first person and problem solved

1 Like

Still doesn’t work…

Quick question. Does your Viewmodel have a PrimaryPart set? If not, try setting one, then, I recommend welding everything in the model to that PrimaryPart AND THEN, CFraming the Viewmodel.PrimaryPart in the RenderStepped update.

That’s not the problem, even if I did First Person for the camera, it doesn’t fix anything.

Okay, I’m going to try to make a PrimaryPart.

1 Like

There’s a flaw in what you’re trying to get him to achieve, if you parent it to the Character, and it sets to First Person Mode, then his whole character goes invisible, that includes all descendants of the character.

That is, unless you make your own custom camera and set it’s CFrame accordingly to the character, but even then, that posts many more issues.

1 Like

Maybe try taking it one step at a time. None of this code will work if your viewModel is not correctly parented and welded to the player correctly FIRST. Once you get that working, it will be a lot easier.

1 Like

Can you explain how I would make a PrimaryPart?

1 Like

On your model called “Viewmodel” you simply press the Property which says “PrimaryPart”, then click any part in the Viewmodel, preferably the Head and boom, you got yourself a PrimaryPart.