No it’s a script to get the position where items must spawn but work only for classic parts.
No red part is a union part and blue is a classic part, blue it’s only to show where items spawn but i don’t want it.
local x = touchZone.Position.x
local z = touchZone.Position.Z
local xS = touchZone.Size.X/2 - 5
local zS = touchZone.Size.Z/2 - 5
You are getting the Position and the Size of the Red partUnion, to know the specific coordinate where the item should spawn, but even if its an union its size still being XYZ, so its a box. Probably thats not a proper approach for your case.
What about, still using the classic parts, all of them inside a folder or model instead of being an union, from that folder you select a random part and then select random coordinates inside that part everytime you want to spawn an item