Script:
function make(pos) local g = Instance.new("Part") g.Parent = workspace g.BrickColor = BrickColor.new("Cork") g.Size = Vector3.new(4,4,4) g.CFrame = pos end script.Parent.Parent.Activated:Connect(function() local mouse = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent):GetMouse() make(mouse.Hit) end)
The problem is that every time this script runs on line 11 it causes an index nil for some reason. How do I fix this?