Hi,
I’ve tried to find more information about this issue, but haven’t had much luck.
Basically, in both of our experiences, we have an issue where players tools will not appear. In Murder Party, this results in the player being unable to perform their roles abilities. In Pet World, the tool is used to push pets around the map. Both situations render the game unplayable.
We have been unable to reproduce this, but the volume of comments is so large that I wanted to know:
Is this a known issue? (The implication from some messages is that this happens in other experiences)
If so, is there plans to release a fix? (Frequency of this issue appears to be increasing, not decreasing)
My best guess: Tool replication is either not reliable, or something external is clearing the backpack.
The tool is not droppable, backpack is enabled. The tool is created on the server, not the client.
Experiences:
Murder Party (play matches)
Pet World (use the map to teleport)
Expected behavior
Tools that are added to backpacks and players to stay there, and not vanish under any circumstances except for when destroyed by the developer.
Given the frequency of these events, and the timing of when this was reported, I think this might be related to the change to Tools to make their base class Model.
March 2nd was the listed release of that version. Our first report was Feb 26th (which would coincide with a % based roll out of the new version?)
The increasing frequency might be related to either client’s being updated over time, or related to the changes to model streaming
Do you have code which calls EquipTool on both the client and server?
If yes there’s an existing bug introduced a few months ago related to that which we have a fix on the way for. This bug can sometimes cause Tools to fall out of your hand, and thus drop out of the map and be deleted. Does that sound like it could be the cause of your issues?
As a workaround until the fix ships, run a snippet of code which deletes any extra RightGrip welds in a player’s character before calling EquipTool on the client to avoid the issue.
Alternatively, do some of the players have a tool in their backpack when they spawn, which gets automatically equipped by the Tool code at a similar time as the server is equipping a tool with EquipTool? That could trigger it as well
(and the workaround in that case would be waiting briefly after spawning a character before equipping the tool on the server)
How do you equip the tool? i mostly do it by connecting the players with playeradded and then waiting for their character since sure the player will load but the character takes a little time to load
There should be nothing present in the backpack at spawn (nothing in StarterGear). The tools are added after the character is loaded. Worth noting that in both cases, tools are added and removed by our code based on in game events - in Murder Party, the tools are removed between matches, and in Pet World they are removed when you enter a battle. Not 100% sure, but at least 1 report suggests that the issue is related to after one of those events, such as in Pet World, after completing a battle and returning to the herding area, the tool does not get re-created.
It waits for the character to load in all cases, and checks if the character is already loaded using the traditional local character = player.Character or player.CharacterAdded:Wait()
This bug can sometimes cause Tools to fall out of your hand, and thus drop out of the map and be deleted
The reason why was mostly because of bad coding, this probably isnt a roblox issue and could just probably be poor code on the developers hands, not roblox
The code I’m using, in case you notice anything immediately wrong. (Server Module)
local FSCaptureCrookManager = {}
local Types = require(game.ReplicatedStorage.Frameworks.Types)
local PMEventUtil = require(game.ReplicatedStorage.Frameworks.Util.PMEventUtil)
local PlayerLoaded = PMEventUtil.GetBindableEvent("PlayerLoaded")
local ToggleRepulseServer = PMEventUtil.GetBindableEvent("ToggleRepulseServer")
local PMSharedUtilities = require(game.ReplicatedStorage.Frameworks.Util.PMSharedUtilities)
local crook: Tool = game.ServerStorage.FarmSim.Capture.CaptureCrook
local function UpdateRepulse(player: Player, isEquipped: boolean)
ToggleRepulseServer:Fire(player, isEquipped)
end
local function CreateTool(player: Player)
local tool: Tool = crook:Clone()
PMSharedUtilities.WeldSubParts(tool.Handle)
tool.Parent = player.Backpack
local char = player.Character or player.CharacterAdded:Wait() -- gets the player's character
local hum = char:FindFirstChildOfClass("Humanoid") -- get the humanoid
hum:EquipTool(tool)
tool.Equipped:Connect(function()
UpdateRepulse(player, true)
end)
tool.Unequipped:Connect(function()
UpdateRepulse(player, false)
end)
UpdateRepulse(player, true)
end
local function RemoveToolFrom(player: Player)
local backpack = player.Backpack
local character = player.Character or player.CharacterAdded:Wait()
local tool = backpack:FindFirstChildOfClass("Tool") or character:FindFirstChildOfClass("Tool")
if tool then
tool:Destroy()
end
UpdateRepulse(player, false)
end
local function EnsurePlayerHasTool(player: Player)
local backpack = player.Backpack
local character = player.Character or player.CharacterAdded:Wait()
if backpack:FindFirstChildOfClass("Tool") then
return
end
if character:FindFirstChildOfClass("Tool") then
return
end
CreateTool(player)
end
local function RefreshBackpack(player: Player)
if player:GetAttribute("IsInBattle") then
RemoveToolFrom(player)
else
EnsurePlayerHasTool(player)
end
end
local function OnPlayerLoaded(player: Player)
-- Handle adding the tool on spawn
task.wait(0.1)
RefreshBackpack(player)
player.AttributeChanged:Connect(function()
RefreshBackpack(player)
end)
end
-- Player loaded is called from our code when the users save state and character have been loaded
PlayerLoaded.Event:Connect(OnPlayerLoaded)
return FSCaptureCrookManager
Thanks for looking into it - I personally have not been able to reproduce it, the comments from our community are pretty vague:
“You get the item and if you equip it and tap on the screen it disappears.”
“i was swinging my sword and it randomly unequipped and disappeared from my inv”
Totally understand not being able to do anything without more information! I could ask the community for more info, but to be honest they aren’t professional QA and probably wouldn’t be able to provide reliable repro steps.
You could try to instrument your game with more info to look for what’s happening. For instance listening for when the Tool.Unequipped event get fired, when the Grip weld gets removed, etc, and look for them happening in an order or at a time you don’t expect.
That’s a way you could get me some more info if you really want to get to the bottom of this.