Hey, I have a camera, and I want the camera CFrame position to be set to the parts CFrame position but I dont want the camera rotation to be changed, how can I do this? Here's the current script lua local camera = game.Workspace:WaitForChild("Camera") game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson camera.CameraType = Enum.CameraType.Scriptable while true do if script.Parent.Head then camera.CFrame = script.Parent.Head.CFrame end task.wait() end
#FPS Camera with rig issues
150 messages · Page 1 of 1 (latest)
You mean the Orientation by Rotation?
?
** You are now Level 6! **
you can just do Camera.CFrame = CFrame.new(part.Position)
local camera = game.Workspace:WaitForChild("Camera")
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
camera.CameraType = Enum.CameraType.Scriptable
while true do
if script.Parent.Head then
camera.CFrame = CFrame.new(script.Parent.Head.Position)
end
task.wait()
end
NO WAY ITS YOU?
Camera doesnt have Position, it has CFrame
Yeah ik realised that myself.
when I try to set Camera.CFrame.Position it says it cant set CFrame.Position
do this @faint coral
Imma try
I think its fixed.
I do not really wanna use roblox default camera since it doesnt really work with my bone rig,
How can I make so when you move your mouse down(the mouse is in mouselock) a bone inside the player (spine2) rotates up and down, or just for now like make the mouse rotate the camera up and down when you move mouse up and down when the mouse is in mouselock
I have the camera as scriptable
Rotate? Well Maybe like but im not sure what you mean.:
local Mouse = game.Players:GetMouse()
Mouse.Move:Connect(function()
end)
This checks if the Mouse moved.
I know, but I dont know how I can make the mouse make the camera go up and down
Oh wait you mean Mouselock.
and I want the mouse to be in mouselock also
and I wanna do this with a script, not lockfirstperson, i need custom camera
Wait. So if you want the Camera to moce you just gotta Change the Orientation of the Camera.
yeah but how do I make the mouse move the camera?
like when the mouse goes up it moves the camera up
also to do this when the mouse is in mouselock
Oh you make a CFrame of the MousePosition and then Use CFrame.lookat().
yeah and how do I make a cframe of the mouseposition? also it should only change from the mouse moving up and down for now
You use a Remote Event.
Wait rq.
I managed to get the camera kinda-good ish now now I gotta fix camera movement
I'm gonna have the spine bone move with the camera
but I will have so if you look over a certain degree to the side then it rotates the whole character
Kind of like the fortnite movementsystem
This is the LocalScript:
Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Move:Connect(function()
local Hit = Mouse.Hit
game.ReplicatedStorage.MousePositionRemoteEvent:FireServer(Hit)
end)
This is the Script:
game.ReplicatedStorage.MousePositionRemoteEvent.OnServerEvent:Connect(function(Player, Hit)
print(Hit.Position)
end)
This will get the MousePosition as a Cfarme.
where do I put scripts?
so one local script and one script
should the script be server or client?
The LocalScript in StarterPlayerCharacter
oki
The Script is Server-Sided.
imma try
thx in advance
Nothing is happening, its not printing anything
oh wait nvm fixed it
I put the localscript inside camera, now I put it in its own script now its printing
This works and prints mouse position, but it doesnt work when you are in mouselock
how can I make it work in mouselock?
okay.
It works
CurrentCamera = game.Workspace.Camera
CurrentCamera.CameraType = "Scriptable"
CurrentCamera.CFrame = script.Parent.CFrame
game.ReplicatedStorage.MousePositionRemoteEvent.OnServerEvent:Connect(function(Player, Hit)
print(Hit.Position)
script.Parent.CFrame = CFrame.lookAt(script.Parent.Position, Hit.Position)
end)
I just did an error
?
whats that
I mean like why does it not change the Camera.
the script I use?
idk, it works now so imma let it be 💀
if it works dont touch it
hahaha
Okay now how do I make the camera rotate with the mouse?
Cause like I have seen other scripts in toolbox that does this
but they are for like menus
Make a Patr and Place the SCript inside it.
game.ReplicatedStorage.MousePositionRemoteEvent.OnServerEvent:Connect(function(Player, Hit)
print(Hit.Position)
script.Parent.CFrame = CFrame.lookAt(script.Parent.Position, Hit.Position)
end)
part where?
WorkSpace.
Anchor it.
Huh.
This is the localscript.
CurrentCamera = game.Workspace.Camera
CurrentCamera.CameraType = "Scriptable"
CurrentCamera.CFrame = game.Workspace.StartScreenCamera.CFrame
Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Move:Connect(function()
local Hit = Mouse.Hit
game.ReplicatedStorage.MousePositionRemoteEvent:FireServer(Hit)
CurrentCamera.CFrame = game.Workspace.StartScreenCamera.CFrame
end)
where I put that?
StarterPlayerCharacter.
New script or same?
I already set the camera type to scriptable
Yeah you can delet that PAret from the Script.
and the thing is im setting the camera CFrame with another script
localscipt:
CurrentCamera = game.Workspace.Camera
CurrentCamera.CameraType = "Scriptable"
CurrentCamera.CFrame = game.Workspace.StartScreenCamera.CFrame
Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Move:Connect(function()
local Hit = Mouse.Hit
game.ReplicatedStorage.MousePositionRemoteEvent:FireServer(Hit)
CurrentCamera.CFrame = game.Workspace.StartScreenCamera.CFrame
end)
script:
game.ReplicatedStorage.MousePositionRemoteEvent.OnServerEvent:Connect(function(Player, Hit)
print(Hit.Position)
script.Parent.CFrame = CFrame.lookAt(script.Parent.Position, Hit.Position)
end)
Overwritte.
Oh yeah name the Part like this.
i just rename script to part
yh
yo dude
I have an issue
these "user_VW" , I dont even have that inside the game this is a completely new game
and I get that everytime I start in every game
aswell as these, "please give credit to speakerpro2"
Ist because of WaitForChild()
no like I dont even have those assets in the game
I can make a new empty baseplate and all those still print
its multiple things
Or you added the Wrong Free Model.
No like a FreeModel had a Virus Maybe.
Im not gonna open this then.
oh hold on chec kDM
ohh wait
it should show as embed
ahh wrong file
there
no
wrong
@thorny mason
but its so glitchy tho
and also
I need to do this in mouselock
it gives this error
smth here
oh wait dude it says script.parent.CFrame inside CFrame
ahhh wait
Iwas supposed to remove teh serverscriptservice script
I found this old script I had
** You are now Level 7! **