Playing an action on MeleeImpact causes the server to crash

Playing an action as soon as the previous action completes causes the server to crash. Before the Neon Coast patch, this behaviour worked as expected. It was implemented in Bodacious Big Bold Boisterous Babel Builder Battle.

Here’s a sample game repro: Crayta

Here’s the entire player script from the sample game. The grip property is set to Knife

local PlayerScript = {}

PlayerScript.Properties = {
	{ name = "grip", type = "gripasset" } 
}

function PlayerScript:Init()
	self:GetEntity():SetGrip(self.properties.grip)
end


function PlayerScript:OnButtonPressed(btn)
	if btn == "primary" then
		self.buttonDown = true
		self:Swing()
	end
end

function PlayerScript:Swing()
	self:GetEntity():PlayAction("Melee", {
		events = {
			MeleeImpact = function()
				if self.buttonDown then
					self:Swing()
				end
			end
		}
		
	})
end

function PlayerScript:OnButtonReleased(btn)
	if btn == "primary" then
		self.buttonDown = false
	end
end

return PlayerScript

Which platform: PC / Stadia

Which input: Controller / keyboard + mouse

Your Crayta username: Cereal

Game seen in (including “Hub” or “Editor for XYZ”): Editor and Bodacious Big Bold Boisterous Babel Builder Battle

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): Every time

Time + date seen: September 11 2021

Version number (found in Help tab in Settings): 0.7.639.110013

Thanks for the perfect bug report, the linked game is much appreciated! Will get this looked and and hopefully fixed ASAP!

Fixed in next patch x

1 Like