#somethings wrong with my first person script
1 messages · Page 1 of 1 (latest)
yeah i agree
can u help please?
oh hecc
I want to show the Player’s body even when zooming into first person and it doesn’t work or error I have tried using a while true loop and while (if true) do loop, both didn’t work My script: -- initialize local variables local Camera = workspace.CurrentCamera local Player = game.Players.LocalPlayer local Character = Player.Character lo...
so this what u used
ye
i just changed
RunService.RenderStepped:Connect(function()
local isfirstperson = (Head.CFrame.Position - Camera.CFrame.Position).Magnitude < FPMaximumDistance; -- Determine wether we are in first person
if (isfirstperson) then
SetCharacterLocalTransparency(FirstPersonLocalTransparency);
else
SetCharacterLocalTransparency(ThirdPresonLocalTransparency);
end
end)
to
RunService.RenderStepped:Connect(function()
local isfirstperson = (Head.CFrame.Position - Camera.CFrame.Position).Magnitude < FPMaximumDistance; -- Determine wether we are in first person
if (isfirstperson) then
SetCharacterLocalTransparency(FirstPersonLocalTransparency);
Player.Character.Humanoid.CameraOffset = Vector3.new(0, 0, -1); -- Change this value to move the camera more or less.
else
SetCharacterLocalTransparency(ThirdPresonLocalTransparency);
Player.Character.Humanoid.CameraOffset = Vector3.new(0, 0, 0);
end
end)
local RunService = game:GetService("RunService");
local Player = game.Players.LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait();
local Camera = game.Workspace.CurrentCamera;
local Head = Character:WaitForChild("Head");
local FPMaximumDistance = 0.6; -- For scalability, but keep it at 0.6 since it is the right distance.
local FirstPersonLocalTransparency = 0;
local ThirdPresonLocalTransparency = 0;
local function SetCharacterLocalTransparency(transparency)
for i,v in pairs(Character:GetChildren()) do
if (v:IsA("BasePart")) and v.Name ~= "Head" then -- Only baseparts have a LocalTransparencyModifier property.
v.LocalTransparencyModifier = transparency;
end
end
end
RunService.RenderStepped:Connect(function()
local isfirstperson = (Head.CFrame.Position - Camera.CFrame.Position).Magnitude < FPMaximumDistance; -- Determine wether we are in first person
if (isfirstperson) then
SetCharacterLocalTransparency(FirstPersonLocalTransparency);
Player.Character.Humanoid.CameraOffset = Vector3.new(0, 0, -1); -- Change this value to move the camera more or less.
else
SetCharacterLocalTransparency(ThirdPresonLocalTransparency);
Player.Character.Humanoid.CameraOffset = Vector3.new(0, 0, 0);
end
end)
have u tried increasing 0.6