Hi I'm a sort of new developer and I saw 2 of your videos, I gave it a try and it works amazingly! You truely are a life saver from typing for 5 hours just for a error 😅
POV Noobs: --*Local Script in StarterPlayer --> StarterCharacterScripts* Change in StarterPlayer MaxZoomDistance to 0.5. local player = game:GetService("Players").LocalPlayer.Character local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then player.Humanoid.WalkSpeed = 34 end end) UserInputService.InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then player.Humanoid.WalkSpeed = 16 end end) coolcapidog: anToggleMouse = {allowed = true; activationkey = Enum.KeyCode.F;} CanViewBody = true Sensitivity = 0.6 Smoothness = 0.05 FieldOfView = 80 HeadOffset = CFrame.new(0,0.7,0) repeat wait() until game:GetService("Players").LocalPlayer.Character ~= nil local runService = game:GetService("RunService") local input = game:GetService("UserInputService") local players = game:GetService("Players")
local cam = game.Workspace.CurrentCamera local player = players.LocalPlayer local m = player:GetMouse() m.Icon = "www.roblox.com/asset/?id=569021388" -- replaces mouse icon local character = player.Character or player.CharacterAdded:wait() local human = character.Humanoid local humanoidpart = character.HumanoidRootPart
local head = character:WaitForChild("Head") local CamPos,TargetCamPos = cam.CoordinateFrame.p,cam.CoordinateFrame.p local AngleX,TargetAngleX = 0,0 local AngleY,TargetAngleY = 0,0
local running = true local freemouse = false local defFOV = FieldOfView
local w, a, s, d, lshift = false, false, false, false, false
function updatechar() for _, v in pairs(character:GetChildren())do if CanViewBody then if v.Name == 'Head' then v.LocalTransparencyModifier = 1 v.CanCollide = false v.face.LocalTransparencyModifier = 1 end else if v:IsA'Part' or v:IsA'UnionOperation' or v:IsA'MeshPart' then v.LocalTransparencyModifier = 1 v.CanCollide = false end end if v:IsA'Accessory' then v:FindFirstChild('Handle').LocalTransparencyModifier = 1 v:FindFirstChild('Handle').CanCollide = false end if v:IsA'Hat' then v:FindFirstChild('Handle').LocalTransparencyModifier = 1 v:FindFirstChild('Handle').CanCollide = false end end end
function lerp(a, b, t) return a * (1-t) + (b*t) end input.InputChanged:connect(function(inputObject) if inputObject.UserInputType == Enum.UserInputType.MouseMovement then local delta = Vector2.new(inputObject.Delta.x/Sensitivity,inputObject.Delta.y/Sensitivity) * Smoothness
local X = TargetAngleX - delta.y TargetAngleX = (X >= 80 and 80) or (X 180 and dist - (dist / math.abs(dist)) * 360 or dist AngleY = (AngleY + dist *0.35) %360 cam.CameraType = Enum.CameraType.Scriptable cam.CoordinateFrame = CFrame.new(head.Position) * CFrame.Angles(0,math.rad(AngleY),0) * CFrame.Angles(math.rad(AngleX),0,0) * HeadOffset humanoidpart.CFrame=CFrame.new(humanoidpart.Position)*CFrame.Angles(0,math.rad(AngleY),0) else game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default end if (cam.Focus.p-cam.CoordinateFrame.p).magnitude < 1 then running = false else running = true if freemouse == true then game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default else game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter end end if not CanToggleMouse.allowed then freemouse = false end cam.FieldOfView = FieldOfView if walkspeeds.enabled then if w and s then return end if w and not lshift then FieldOfView = lerp(FieldOfView, defFOV,easingtime) human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.walkingspeed,easingtime) elseif w and a then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.diagonalspeed,easingtime) elseif w and d then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.diagonalspeed,easingtime) elseif s then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed,easingtime) elseif s and a then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed - (walkspeeds.diagonalspeed - walkspeeds.backwardsspeed),easingtime) elseif s and d then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed - (walkspeeds.diagonalspeed - walkspeeds.backwardsspeed),easingtime) elseif d then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.sidewaysspeed,easingtime) elseif a then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.sidewaysspeed,easingtime) end if lshift and w then FieldOfView = lerp(FieldOfView, walkspeeds.runningFOV,easingtime) human.WalkSpeed = lerp(human.WalkSpeed,human.WalkSpeed + (walkspeeds.runningspeed - human.WalkSpeed),easingtime) end end end)
u just earned urself another sub, ivce only watched ur tutorials 2 times, and they work, not only that, but i dont have to spend 30 minutes to get the script.
If someone's having problem with sensitivity being too slow, than smaller the number = than faster you can look. So write a smaller number than a high one. Also, thank you for the tutorial :).
Hey CoolCapidog. What if I want to add my running and walking animation into the first person mode. How do I do it? Because if I just copy my character's Animate script and place my ID in there, in the first person it does not work. CAn someone help me please, for example you CoolCapiDog?
Your script is great! But there is a issue, It just does not function for mobile. Is there any way you can make it work for mobile? If so please let me know, thanks.
for me it dosent work .... i did not make a single mistake following this video and my head disssapeared and i can zoom out and in......... please help me
Hey! I would like to tell you that this script works perfectly fine. I would like to request that this first person script should also be compatible for mobile too! I like the camera locking on the player's head, that's all :)
can u make a video on fall damage? Btw new sub u help me with legit everything and ur gonna make my game so much better :D edit: you should also make a video on how to have a working security camera system
So I made a game and when you walk, you just move, but your character has no walking animation. It just looks like a brick sliding against the ground. Do you know how to fix it?
So, I need my cursor to be able to freely move around the screen and I do not have much knowledge about Lua scripts. The reason of this is because the player needs to click responses when dialogue pops up which is at the bottom corner of there screen. So if you possibly can could you find a way to fix that perhaps in another video?
🤑I'm selling fully scripted simulator game. 👉Watch the full video here: ruclips.net/video/FnSwoFdULJY/видео.html
Any idea how to change the sensitivity for this first person script?
Edit: nvm just turn up ur own sensitivity 💀
heyy its broken for me and the head just floats their while the body moves!
Doesn't get any better.
1 minute, straight to the point.
Worked well for me, and for my upcoming horror map.
Thank you!
Hi I'm a sort of new developer and I saw 2 of your videos, I gave it a try and it works amazingly! You truely are a life saver from typing for 5 hours just for a error 😅
me too!
bro does urs have any issues? when i reset the camera doesnt go to the new body
@@beanie.weanie same
@stefsbloxfruits2971 at least I'm not alone
Btw The Body Is Invisible And the Script Crashed Studio.
POV Noobs:
--*Local Script in StarterPlayer --> StarterCharacterScripts*
Change in StarterPlayer MaxZoomDistance to 0.5.
local player = game:GetService("Players").LocalPlayer.Character
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
player.Humanoid.WalkSpeed = 34
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
player.Humanoid.WalkSpeed = 16
end
end)
coolcapidog:
anToggleMouse = {allowed = true; activationkey = Enum.KeyCode.F;}
CanViewBody = true
Sensitivity = 0.6
Smoothness = 0.05
FieldOfView = 80
HeadOffset = CFrame.new(0,0.7,0)
repeat wait() until game:GetService("Players").LocalPlayer.Character ~= nil
local runService = game:GetService("RunService")
local input = game:GetService("UserInputService")
local players = game:GetService("Players")
local cam = game.Workspace.CurrentCamera
local player = players.LocalPlayer
local m = player:GetMouse()
m.Icon = "www.roblox.com/asset/?id=569021388" -- replaces mouse icon
local character = player.Character or player.CharacterAdded:wait()
local human = character.Humanoid
local humanoidpart = character.HumanoidRootPart
local head = character:WaitForChild("Head")
local CamPos,TargetCamPos = cam.CoordinateFrame.p,cam.CoordinateFrame.p
local AngleX,TargetAngleX = 0,0
local AngleY,TargetAngleY = 0,0
local running = true
local freemouse = false
local defFOV = FieldOfView
local w, a, s, d, lshift = false, false, false, false, false
local easingtime = 0.1 --0~1
local walkspeeds = {
enabled = true;
walkingspeed = 16;
backwardsspeed = 10;
sidewaysspeed = 15;
diagonalspeed = 16;
runningspeed = 25;
runningFOV= 85;}
function updatechar()
for _, v in pairs(character:GetChildren())do
if CanViewBody then
if v.Name == 'Head' then
v.LocalTransparencyModifier = 1
v.CanCollide = false
v.face.LocalTransparencyModifier = 1
end
else
if v:IsA'Part' or v:IsA'UnionOperation' or v:IsA'MeshPart' then
v.LocalTransparencyModifier = 1
v.CanCollide = false
end
end
if v:IsA'Accessory' then
v:FindFirstChild('Handle').LocalTransparencyModifier = 1
v:FindFirstChild('Handle').CanCollide = false
end
if v:IsA'Hat' then
v:FindFirstChild('Handle').LocalTransparencyModifier = 1
v:FindFirstChild('Handle').CanCollide = false
end
end
end
function lerp(a, b, t)
return a * (1-t) + (b*t)
end
input.InputChanged:connect(function(inputObject)
if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
local delta = Vector2.new(inputObject.Delta.x/Sensitivity,inputObject.Delta.y/Sensitivity) * Smoothness
local X = TargetAngleX - delta.y
TargetAngleX = (X >= 80 and 80) or (X 180 and dist - (dist / math.abs(dist)) * 360 or dist
AngleY = (AngleY + dist *0.35) %360
cam.CameraType = Enum.CameraType.Scriptable
cam.CoordinateFrame = CFrame.new(head.Position)
* CFrame.Angles(0,math.rad(AngleY),0)
* CFrame.Angles(math.rad(AngleX),0,0)
* HeadOffset
humanoidpart.CFrame=CFrame.new(humanoidpart.Position)*CFrame.Angles(0,math.rad(AngleY),0)
else game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default
end
if (cam.Focus.p-cam.CoordinateFrame.p).magnitude < 1 then
running = false
else
running = true
if freemouse == true then
game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default
else
game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
end
end
if not CanToggleMouse.allowed then
freemouse = false
end
cam.FieldOfView = FieldOfView
if walkspeeds.enabled then
if w and s then return end
if w and not lshift then
FieldOfView = lerp(FieldOfView, defFOV,easingtime)
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.walkingspeed,easingtime)
elseif w and a then
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.diagonalspeed,easingtime)
elseif w and d then
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.diagonalspeed,easingtime)
elseif s then
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed,easingtime)
elseif s and a then
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed - (walkspeeds.diagonalspeed - walkspeeds.backwardsspeed),easingtime)
elseif s and d then
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed - (walkspeeds.diagonalspeed - walkspeeds.backwardsspeed),easingtime)
elseif d then
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.sidewaysspeed,easingtime)
elseif a then
human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.sidewaysspeed,easingtime)
end
if lshift and w then
FieldOfView = lerp(FieldOfView, walkspeeds.runningFOV,easingtime)
human.WalkSpeed = lerp(human.WalkSpeed,human.WalkSpeed + (walkspeeds.runningspeed - human.WalkSpeed),easingtime)
end
end
end)
wat skip is this bro its different from his
is that the code?
For me you are the best roblox studio tuto youtuber
I agree
Tysm for making this! It worked for my midnight at 7-11 game...You earned a subscriber for helping out a small horror developer!
sounds like a fun game
w game btw
yoo i played that its pretty good if it was yours
It worked at first when i tested the game, then when i joined the actual game the next day, it just gave me headless.
Same
idk how to code but i found out how to fix that, just set the "view body" to false
same
tysm dude it helped me so much when i was tryna make a horror game
me too
this is amazing it works perfectly, no flaws and its so smooth
Exactly what I needed for my game, thank you so much!
Please can you also make a lobby teleportation system? Your tutorials are the best! Love your videos :)
Pls i want to make one 😊
Plsss
Ponchokings has one! Check It Out!
Thank u man Ur tutorials are easy to follow and the best part is u give us free models!
whoever uploaded ts on waybackmachine is a real one👑
WORD TWO
YESSIR
TySM For Making It In The Desc!
Brooooo. I was looking for it far n wide... Tysmmm
can u make minimap with others players icons too ?
he made you a question
@@sorkinquinzelwhere
thanks so much, me and my gf are making a horror game and we are so excited that we are able to make such a good animation. You earned urself a sub :)
u just earned urself another sub, ivce only watched ur tutorials 2 times, and they work, not only that, but i dont have to spend 30 minutes to get the script.
thank you so much it made 5 hours of coding 5 seconds and it actually works
ex tip go starter character scripts shearch camera mode and put first person
im gonna make a good police bodycam game with this
doesnt have any way that i can switch back to 3rd person? Like i can switch 1st person or 3rd but when i go 1st person i can see my body.
If someone's having problem with sensitivity being too slow, than smaller the number = than faster you can look. So write a smaller number than a high one. Also, thank you for the tutorial :).
I love comments like yours they most of the time help
thanks bro
no problem :)@@ArcaPuer
Thanks bro im making a horror game but i dident know how to make the game first person but this helped me a lot thanks
I love your videos so much your the best ur so quick and good you help me a lot with these videos
you are the only youtuber that put a link in the description for the script instead of scripting in the video
Works perfectly for my Napoleonic war game… I can see the musket perfectly at the bottom of my screen
👉🏻You can hire me here: www.fiverr.com/share/4Q0a2G
where is script
@@cnaruzunhan271description
@@cnaruzunhan271 bruh
Hey CoolCapidog. What if I want to add my running and walking animation into the first person mode. How do I do it? Because if I just copy my character's Animate script and place my ID in there, in the first person it does not work. CAn someone help me please, for example you CoolCapiDog?
@@cnaruzunhan271 Link to it in desc, Ik I said that 5 months late 💀 But if you still need it, it's there!
your videos i sooo fire i making hammer battles game and your videos is help me aloth
Can you make tutorial how to make first person after push play button in main menu please
Please my friend, I want a video on how to create a jumpscar. In roblox studio
TYSM! THIS HELP SO GOOD!
THE SCRIPT is a threat
Thank u bro! This will help much in my game.
ik that many people have a problem with the senstivity, to make it faster, at the 3rd row of the script, turn 0,6 to 0,1. np
really thank you you solved my problems
Earned a sub, TBH I DONT EVEN KNOW WHY I WASNT SUBBED YET WHEN I MET U MONTHS EARLIER!
yo bro ty you so much i have been looking for this video for a long time so ty you !!!!!!!
I SWEAR THIS MAN DESERVE MORE THEN 8.29k SUBSCRIBERS
u sure bud? it aint working for me
is it possible to remove the shift to sprint part?
Yes I think kso
really nice tutorial, easy, short, really useful, 10/10
i entered the script and then clicked play and then nothing changed?
Your script is great! But there is a issue, It just does not function for mobile. Is there any way you can make it work for mobile? If so please let me know, thanks.
i need help on that too
Bro same I was looking If anyone else wanted to make a function for mobile
Yeah same here
How do I make these work for mobile the rotating
BRO JUST EARNED A SUB GUYS WATCH THE VID WITH THE SHIFT RUN!!
idk why but when i play it , i don't see my body 🤐😐 Did i miss something ?
same here
for me it dosent work .... i did not make a single mistake following this video and my head disssapeared and i can zoom out and in......... please help me
dynamic heads wont work
@@Donylitwdym
To fix the zoom in and out bug go to the starterplayer properties then go to camera properties then set CameraMode to LockFirstPerson
I made everything like you, but it isn't working. Don't know what could be wrong?
I tried using it but it just ended up with my character not having a head....
Same
Omg It worked and its the best first person in roblox i have ever seen
BRO TYSM ❤
*coolcapidog i waiting this video too much days tell me why are u don't made video how to make badge what giving an avatar item/UGC tell me pls*
Can you make a sliding proximity keycard door?
Yeah
It works, but I didn't expect roblox servers to be down while testing this.
Amazing bro thanks a lot! New sub my dude.
The code just made my character headless
same
same
bro i just made me lose my head💀💀
same, my head disappeared and im still in 3rd person
Hi i just wanna ask you how do i make it work on phone. It has some bugs such as camera not moving
This is the exact free model i used before 7 months ago - what?
similar scripts bro
@@coolcapidog Lol cool bro! keep up the good work though!
@@coolcapidog Yo the script got taken down can u make a new one???
Tysm im subbing this works so well
When testing i cant move, pressing wasd and space my character doesnt move.
How do I disable the running feature? I don't need that as I already got a running script and I need to access it.
script was deleted i hav error 404
BRO NONE OF THESE SCRIPTS WORK
Only part of this works for me. the animation and mouse works but i can't see my body
why?
i litteraly used this yesterday and it was working fine and now today it the script just broke and i didn't change anything in the code
Hey!
I would like to tell you that this script works perfectly fine.
I would like to request that this first person script should also be compatible for mobile too! I like the camera locking on the player's head, that's all :)
thank because i want to make a game in roblox but it does´nt like at roblox and than is this verry helpfull
You thank yo❤u so much I’m creating a game but you showed me how to TYSMMMMM
tysm bro it works!
THIS HELPED ME SO MUCH TY U JUST EARNED A SUB!
This works rlly well, thanks
Why my character head be headless?
fr
Thanks this was really helpful!
you're welcome!
omg thx bro i wasnt expecting it to be a basic simple tut(orial). This is good for begginers
did u just abbreviate tutorial and then wrote the whole word out anyways
true
@@1noxy470 lol
Thanks budy it helped me❤
AMAZING! But I don’t see my body…
same
the wrost problem is that when you come infront of a rig or a player you will see yourself taller than him also there a chance to see your face decal
Nice for my doors floor 2
can u copy paste the script pls pastebins banned in my country
@@deathare4332 bro, which country ban pastebin💀but the script not work
pastebin just deleted your script by the way.
i cant get the script cuz the site blocked it :(
man its relly relly coooooool is working and is very smooth
honestly best person in the world
your script does not work anymore
Very nice :D
I might make this into a free script
it already is a free script
The legend is back once again...
Helped so much thanks!
capi can you make a tutorial for a chest with a loot table similiar to fortnite chests?
For some reason now I’m nit able to move my character in my game on mobile
Yooo thank you very much I’m making my rooms fan game
How to mqke frist person animations?
pls how to make Stage to obby in roblox studio
why it dont work
for me
Inventory system next ?
Thanks so much! 👍
can u make a video on fall damage? Btw new sub u help me with legit everything and ur gonna make my game so much better :D edit: you should also make a video on how to have a working security camera system
thank you man works fantastic
So I made a game and when you walk, you just move, but your character has no walking animation. It just looks like a brick sliding against the ground. Do you know how to fix it?
So, I need my cursor to be able to freely move around the screen and I do not have much knowledge about Lua scripts. The reason of this is because the player needs to click responses when dialogue pops up which is at the bottom corner of there screen. So if you possibly can could you find a way to fix that perhaps in another video?
maybe you can find a separate tutorial which is something like "how to free your mouse in first person game"
That is a good idea @user-yg2vg5ri5v
in the code you press F to release mouse
i made this one just trough the toolbox
It I join on mobile it doesn’t let me move my camera. Any way to fix this?
YOU ARE A SAVIOUR, MY DUDEEEEEEEE, YOU JUST EARNED A SUB
dude this is perfect !!