Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make a horror first person view model?

So I want to make a viewModel for a first person horror game, so when you look down, you see your body. I followed a dev forum by EgoMoose here; Before I thought I had fixed the problem by realizing that I forgot to parent the viewmodel clone but that was not the problem. Here is my code currently.

local camera = game.Workspace.CurrentCamera;
local humanoid = game.Players.LocalPlayer.CharacterAdded:Wait():WaitForChild("Humanoid");

local viewModel = game.ReplicatedStorage:WaitForChild("viewModel"):Clone();
viewModel.Parent = camera

local function onDied()
    viewModel.Parent = nil;
end

local function onUpdate(dt)
    viewModel.Head.CFrame = camera.CFrame;
end

humanoid.Died:Connect(onDied);
game:GetService("RunService").RenderStepped:Connect(onUpdate)

I don't get any errors, and I don't know what to do. Please provide input. I think the problem might be that the tutorial given by EgoMoose is intended to be used with a gun, but I don't know how I would change it to be what I want it to be.

Issue: Nothing happens, when I look down I see nothing I have checked every part in the model, and everything's transparency is 0.

Steps Taken: I have tried changing the parent of the model to Workspace, Camera, and PlayerGui but none have worked. I don't know what else to do other than that.

Edit: I apologize for not including this in the original question, but I do have LockFirstPerson on.

1 comment

0

bump

1 answer

✓ Accepted answer

Hello! There is an easy fix to this through a script. Here it is:

local player = game.Players.LocalPlayer
player.CameraMode = Enum.CameraMode.LockFirstPerson

Add this as a local script into the StarterGui. Then just go to the StarterPlayer and set CameraMaxZoomDistance to 0

2 comments

0

I already had LockFirstPerson on, sorry I forgot to mention, I'll add this in an edit.

0

Okay, I updated my answer, that should work now.

This discussion is preserved as it was. New answers, comments, and votes are closed.