Hello there,
Im having trouble with a serious problem that affects my game pretty much.
My game is based on an anime soccer with tools; the problem is that, one time i had to close my game for irl problems, but recently i re-opened it and i found out the ball was having infinite roll for some reason even tho i didnt touch the game’s studio in a while.
Altought i dont know whats causing it as i made a script to prevent the infinite roll but apparently it aint working.
This the script inside the ball:
local debris = game:GetService("Debris")
while true do
wait()
if script.Parent.Velocity.Magnitude > 0 then
wait()
item = script.Parent
local F = Instance.new("BodyForce")
F.Force = Vector3.new(-item.Velocity.X * 0.3, 0, -item.Velocity.Z * 0.3)
F.Parent = item
debris:AddItem(F, 0.3)
end
end
if any of you can help me fix it, i would really appreciate it,