Hey Developers,
I have a simple question:
I am creating a Tween in the code example down below.
local Slide = ts:Create(game.Players.LocalPlayer.Character:WaitForChild("Humanoid"), CrawlInfos, {CameraOffset = Vector3.new(0, -3, 0)})
This function just changes the Camera Offset. Is it possible to just define the “-3”?
I want to reach that the vectors x and z stay the same. But it isn’t possible to do:
local Slide = ts:Create(game.Players.LocalPlayer.Character:WaitForChild("Humanoid"), CrawlInfos, {CameraOffset = Vector3.new(CameraOffset.x, -3, CameraOffset.z)})
because the CameraOffset is not defined. Any help would be appreciated!
Vector3 are ready only meaning you can’t change one of the values and leave the other, your best move is making a variable for humanoid and then putting same camera offset for the un-changed parts.
That worked thank you! Another question, offtopic:
im making a realistic first person and i have the problem when i change the cameraoffset (so that the player sees his body parts), the player can see through walls… any elegant ways to prevent this?
Here is a video: