I cant see what ive done wrong with this script. Its meant to be a Can-Collide script for a TAS GUI im making for Flood Escape 2. Can Someone help me correct this?
```local UserInputService = game:GetService("UserInputService")
input.UserInputType == Enum.UserInputType.keyboard then if input.Keycode == Enum.Keycode.X then for _, child in ipairs(workspace.Map:GetDescendants()) do if child:IsA("BasePart") then child.Transparency = child.CanCollide and 0 or 1 local shade = math.random() / 2 + 0.5 if child:IsA("UnionOperation") then child.Color = Color3.new(shade, shade, 0) elseif child:IsA("MeshPart") then child.Color = Color3.new(0, shade, 0) else child.Color = Color3.new(shade, shade, shade) end end end end```