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

How do I disable CanCollide while a part is being animated?

Asked by 3 years ago
Edited 3 years ago

I am working on my viewmodel for my fps game and I will be using ROBLOX animations. When I zoom in, it messes with the player and the player starts moving everywhere. Since the hold animation is playing, I cannot set CanCollide to false. Every part that is animated will have CanCollide set to true. The viewmodel's parent is camera so when I zoom in it would just throw my player off my map. Any suggestions on how to turn off CanCollide while a part is being animated?

(https://gyazo.com/a541e467e4656b2756503a2238289f56)

0
Could you post your code? Or post your attempts? See https://idownvotedbecau.se/NoAttempt and https://idownvotedbecau.se/NoCode for more information User#30567 0 — 3y

1 answer

Log in to vote
0
Answered by
Qariter 110
3 years ago

Try using collisiongroups. Might solve the issue for you. If it does not, try using

game:GetService("RunService").RenderStepped:Connect(function(
-- input code that makes your gun uncollideable
end)
Ad

Answer this question