I have a problem where everytime I go third person in my game I can walk through walls as long as I am not jumping.
Here is a video of what is going on: https://youtu.be/x01zF-RkdSs
Here is my script for third/first person.
USER_S.InputBegan:Connect(function(input)
local key = input.KeyCode
if key == Enum.KeyCode.Z or key == Enum.KeyCode.DPadUp then
local player = game.Players.LocalPlayer
if player.CameraMode == Enum.CameraMode.LockFirstPerson then
player.CameraMode = Enum.CameraMode.Classic
game.Players.LocalPlayer.CameraMinZoomDistance = 2
else
game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
game.Players.LocalPlayer.CameraMinZoomDistance = 0
end
end
if key == Enum.KeyCode.ButtonR1 then
autodown = true
end
end)

4 comments
your collision group is not set on your viewmodel
seems like you set your collision group on the character and not the viewmodel
im sorry but what is a viewmodel?
and i can also shoot through walls when the raycasting is handled on the server