Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does third person make my character go through walls?

Asked by 3 years ago
Edited 3 years ago

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)
0
your collision group is not set on your viewmodel Donut792 216 — 3y
0
seems like you set your collision group on the character and not the viewmodel Donut792 216 — 3y
0
im sorry but what is a viewmodel? bromy_dad 0 — 3y
0
and i can also shoot through walls when the raycasting is handled on the server bromy_dad 0 — 3y

Answer this question