For this Render script there’s a folder in workspace called “Outfits” and it just has roblox avatars inside it and over 3,013 avatars inside. The script works as it’s supposed to as you can tell it’s supposed to only show models in the radius of the player which is does that. There is a proximitypromt script and multiple scripts that do things for the folder in workspace called “Outfits” that for all models inside, there is a button you hold for a avatar purchasing gui that pops up and allows you to purchase the avatar. The issue I came across is sometimes when you join the game the proximityprompt is gone and you no longer can view the model/purchase items, but sometimes when you join it does work, it will also happen on every device. For my final guess of what’s going on is that the render script is preventing the other scripts to load properly for anything for the “Outfits” folder in workspace. Hopefully the two videos of it working and not working for a better example an idea of what’s going on
local renderRadius = 45 -- Render distance radius
local refreshFrequency = 10 -- Amount of frames to wait before checking the distance of objects
local renderFolder = Instance.new("Folder", game:GetService("ReplicatedStorage"))
renderFolder.Name = "RenderCache"
local localchar = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local localhrp = localchar:WaitForChild("HumanoidRootPart")
local treeParts = {}
for i,object in pairs(workspace.Outfits:GetChildren()) do
if object:IsA("Model") then
table.insert(treeParts,object)
object.Parent = renderFolder
end
end
local irfs=0
local function updateRender()
irfs=irfs+1
if irfs>=refreshFrequency then
irfs=0
if localhrp then
for i,v in pairs(treeParts) do
local startPart = v:FindFirstChildWhichIsA("BasePart")
if startPart then
local partDistRender = (startPart.CFrame.p-localhrp.CFrame.p).magnitude
if partDistRender>renderRadius then
if v.Parent==workspace then
v.Parent=renderFolder
end
else
if v.Parent==renderFolder then
v.Parent=workspace
end
end
end
end
end
end
end
game:GetService("RunService"):BindToRenderStep("RenderSys", 1, updateRender)