Hey! I recently tried to remove all the textures in the workspace but i can’t do it, I tried this but didnt work
for _, i in pairs(game.Workspace:GetChildren()) do
if i:IsA("Texture") then
i.Transparency = 1
end
end
Hey! I recently tried to remove all the textures in the workspace but i can’t do it, I tried this but didnt work
for _, i in pairs(game.Workspace:GetChildren()) do
if i:IsA("Texture") then
i.Transparency = 1
end
end
This is most likely due to you using GetChildren() instead of GetDescendants()
do game.Workspace:GetDescendants()
and it should work.
Hey! I put your reply and still don’t work
for _, i in pairs(game.Workspace:GetDescendants()) do
if i:IsA("Texture") then
i.Transparency = 1
end
end
Where is this script located? And is it a local script or server script?
Its a localscript putted in a gui from startergui
After trying it out myself, I realized this is happening since the Character hasnt loaded in yet. Just adding a task.wait(3)
lets the game load in and then the script can find the necessary textures.
Basically just wait for game to load then run the script.
Thank you so much! It worked and with no errrors!
Different games have different load times. @Crystobynatt it would be better if you defined the character as:
local Player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
This code waits till the character is loaded before executing the code below it.
Yea of course, thats why I specified in the end that the end fix was wait for the game to load first. Also player.CharacterAdded:Wait()
doesnt fix this issue. It’s the same as player.CharacterAppearanceLoaded:Wait()
Yeah i used game:isLoaded() for check when game is loaded
Yea good, I was gonna tell you to use that.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.