Weird studio freezing

You can write your topic however you want, but you need to answer these questions:

  1. What’s my issue? Once I playtest my game with the localTransparency variable being 1, roblox studio freezes up completely. But if I Change the localTransparency variable to 0, it performs fine? I think it may be a bug with geometry rendering within the engine code, but I’m not an expert in engine programming.

  2. What solutions have you tried so far? I’ve tried searching on the Forum for similar problems but I’ve yet to come across anything relevant.

Here’s the code in question:
( This piece of code is within a for loop, which is iterating over every child inside the players character.)

child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
                    child.LocalTransparencyModifier = LocalTransparency
                end)
for _, child in ipairs(playerCharacter:GetChildren()) do
    if child:IsA("BasePart") then
        local connection
        connection = child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
            connection:Disconnect()  -- Disconnect the signal temporarily
            child.LocalTransparencyModifier = LocalTransparency
            connection = child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
                -- Reconnect the signal if needed
            end)
        end)
    end
end

Nvm I found the issue, there was a script conflicting with this script.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.