[size=1]I didn’t know where else to put this and it’s 3 AM[/size]
REPRO:
- Insert the “ROBLOX Kitchen set” by UristMcSparks
- open the refrigerator
- reset
- try to close the refrigerator
You can’t because ROBLOXInteraction didn’t get added again. This code nugget used to work, and now it doesn’t:
local addMyLocalScript = function(player)
local localScript = fridge.ROBLOXInteraction:Clone()
local backpack = player:WaitForChild("Backpack")
if not player:WaitForChild("Backpack"):FindFirstChild("ROBLOXInteraction") then
localScript.Parent = player.Backpack
end
end
-- Loop through all players when model added
for _, player in pairs(game.Players:GetPlayers()) do
addMyLocalScript(player)
end
-- Add script when player is added
game.Players.PlayerAdded:connect(function(player)
addMyLocalScript(player)
end)