Need help with GetDescendants() excluding certain two parts for a transparency tween

Hello! So i have a server event that turns the player visible, and it works as intended but it it also seems to turn the two parts i have called “AurahBruh” and “Warning” visible as well but i don’t want it to turn them visible., mostly everything ive looked up hasnt been of much use D: i would make the two parts something else like a mesh but thatll break a lot of other scripts

turnvisible.OnServerEvent:Connect(function(plr)
	local body = plr.Character:GetDescendants()
	for _, person in pairs(body) do
		if person:IsA("BasePart") then	
			
			local turningvisible = ts:Create(person, tweeninfo3, visible)
			turningvisible:Play()
		end
	end
end)
if person.Name == "AurahBruh" or person.Name == "Warning" then
    continue
end
1 Like

wouldn’t that just continue if theyre part of the descendants? i need it so the two baseparts are excluded from the descendants

Do not be fooled by the absence of syntax highlighting. For some odd reason, the developers of the DevForum thought it unnecessary to use Luau’s syntax highlighting engine. continue is a valid keyword in Luau which is used to skip the current iteration of a loop. The if-statement I gave to you acts as a guard-clause for the rest of the loop’s body, which will not be executed if continue is reached

for number = 0, 10 do
    if number % 2 ~= 0 then
        continue
    end

    print(number)
end
0
2
4
6
8
10

The above is a code example which omits the printing of a number if that number is odd

ah i see, also it did work!! thank you!! i really appreciate it! maybe now i can sleep since its 4 am!

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