Is there another way to that does the same thing, because if there were more I have to add, that would be a lot of code.

wait(1)
local dGroup = script.Parent.Parent.Parent.AutoFill.DGroup
local eGroup = script.Parent.Parent.Parent.AutoFill.EGroup
local wGroup = script.Parent.Parent.Parent.AutoFill.WGroup

while true do	
	wait(0.1)
	if script.Parent:GetPropertyChangedSignal("Text") then
		if script.Parent.Text == "D" or script.Parent.Text == "d" then
			dGroup.Visible = true
			eGroup.Visible = false
			wGroup.Visible = false
		end
	
		if script.Parent.Text == "E" or script.Parent.Text == "e" then
			dGroup.Visible = false
			eGroup.Visible = true
			wGroup.Visible = false
		end
	
		if script.Parent.Text == "W" or script.Parent.Text == "w" then
			dGroup.Visible = false
			eGroup.Visible = false
			wGroup.Visible = true
		end
		
		if script.Parent.Text == "" then
			dGroup.Visible = false
			eGroup.Visible = false
			wGroup.Visible = false
		end
	end
end

Thanks for the Help!

2 comments

0

Use elseifs.

0

I would reccomend putting the code in the While loop into a localfunction