Working on a GUI when I stumbled on an error with vector3's. An error on line 8
local function GenerateSelectionModel() if SelectionModel then SelectionModel:Destroy() end local Prefab = PrefabTable[SelectionNumber] if Prefab then SelectionModel = Prefab:Clone() SelectionModel:SetPrimaryPartCFrame(CFrame.new(Mouse.Hit.p) * CFrame.Angles(0, math.rad(CurrentRotation), 0) * CFrame.new(SelectionModel:FindFirstChild("Compensation")) or {Value = Vector3.new() * CFrame.new(0, SelectionModel.PrimaryPart.Size.Y / 2, 0)}) local Cache = SelectionModel:GetDescendants() Mouse.TargetFilter = SelectionModel for i = 1, #Cache do if Cache[i]:IsA("BasePart") then Cache[i].Material = Enum.Material.Glass if Cache[i]:IsA("UnionOperation") then Cache[i].UsePartColor = true end if Cache[i]:IsA("Seat") then Cache[i].Disabled = true end if Cache[i].Transparency ~= 1 then Cache[i].Transparency = 0.5 end Cache[i].CanCollide = false end end if Equipped then SelectionModel.Parent = PrefabsFolder end end end
This is a local script inside StarterCharacterScripts; if you need more information do ask. Thanks