Hello, I released a XBOX Support update on a game I’m currently working on. Suddenly after 1 day, all the servers crash when you do 1 specific thing, I have tried my best trying to find the Issue but I couldn’t find the Issue. I even reverted the game to many versions but the bug is still there. The LocalScript handles a “Goalkeeper System”, to catch the ball which is causing the Issue, it worked fine for months but now It doesn’t. Could someone help me out?
local function Dive(height: string)
if states["Diving"] then return end
if humanoid.PlatformStand then return end
states["Diving"] = true
kickaction = "Dive"
humanoid.JumpPower = 0
humanoid.AutoRotate = false
humanoid.PlatformStand = true
states["HandlingShoot"] = true
if shooting.Shoot(kickaction, yvector, camera, upvelocity) then
kickaction = nil
end
states["HandlingShoot"] = false
local direction
local cframe = humanoidrootpart.CFrame
if (humanoid.MoveDirection:Dot(cframe.RightVector) > 0.5) then
direction = "Right"
workspace.Orientation.CFrame = cframe * CFrame.Angles(0, 0, -math.rad(80))
elseif (humanoid.MoveDirection:Dot(cframe.RightVector) < -0.5) then
direction = "Left"
workspace.Orientation.CFrame = cframe * CFrame.Angles(0, 0, math.rad(80))
else
if (humanoid.MoveDirection:Dot(cframe.LookVector) > 0.5) then
workspace.Orientation.CFrame = cframe * CFrame.Angles(-math.rad(40), 0, 0)
elseif (humanoid.MoveDirection:Dot(cframe.LookVector) < -0.5) then
workspace.Orientation.CFrame = cframe * CFrame.Angles(math.rad(30), 0, 0)
else
workspace.Orientation.CFrame = cframe
end
direction = "Middle"
end
local force = workspace.Orientation.CFrame.UpVector * 300 -- 300
local isright = direction == "Right"
local diveanimation
local isinair = true
local raycastresult = workspace:Raycast(humanoidrootpart.Position, Vector3.new(0, -3, 0))
if raycastresult and not humanoid.Jump then
isinair = false
end
if height == "High" then
local upwardsforce = 525 -- 550
if isinair or humanoidrootpart.AssemblyLinearVelocity.Y > 0.5 then
if direction ~= "Middle" then
upwardsforce = 100
warn"right dive"
diveanimation = animation_handler.GetAnimation("HighDive", isright)
else
upwardsforce = 0
diveanimation = animation_handler.GetAnimation("StraightDive")
end
else
if direction ~= "Middle" then
diveanimation = animation_handler.GetAnimation("MidDive", isright)
else
upwardsforce = 350
diveanimation = animation_handler.GetAnimation("StraightDive")
end
end
force += Vector3.new(0, upwardsforce, 0)
humanoidrootpart:ApplyImpulse(force)
else
humanoidrootpart:ApplyImpulse(force)
if isinair or humanoidrootpart.AssemblyLinearVelocity.Y > 0.5 then
if direction ~= "Middle" then
diveanimation = animation_handler.GetAnimation("HighDive", isright)
else
diveanimation = animation_handler.GetAnimation("StraightDive")
end
else
if direction ~= "Middle" then
diveanimation = animation_handler.GetAnimation("LowDive", isright)
else
diveanimation = animation_handler.GetAnimation("GKSpread")
end
end
end
alignorientation.Enabled = true
diveanimation:Play()
task.wait(0.5)
kickaction = nil
if direction == "Left" then
workspace.Orientation.CFrame = cframe * CFrame.Angles(-math.rad(90), 0, math.rad(90))
elseif direction == "Right" then
workspace.Orientation.CFrame = cframe * CFrame.Angles(-math.rad(90), 0, -math.rad(90))
else
alignorientation.Enabled = false
end
diveanimation:Stop()
alignorientation.Enabled = false
Ragdoll(1)
states["Diving"] = false
end
The script worked fine for months and hasn’t been touched, now it crashes the server, there is no error output or anything.
Yes this is a strange on, might be worth testing on the actual place to see if it just dont like studio, your script seems has no isses so probably just studio
I searched the scripts more and realised that my scripts dont have any problem, I think that roblox has a issue on their end, all the scripts worked for months and now they dont work. I hope this issue gets resolved by roblox, but thanks for helping out.