I'm trying to make this "New Part" spawn at the exact location that I choose, if there is a block in the way, it moves up, is there a way I can force it to a certain position and make it disregard the other blocks and models?
ting = true
Dist = 100
function Touch(hit)
if ting == true then
local hurt = game.Lighting.PainScript:Clone()
local boom = Instance.new("Explosion", script.Parent)
local pain = Instance.new("Part", script.Parent)
hurt.Parent = pain
hurt.Disabled = false
pain.Anchored = true
pain.Size = Vector3.new(Dist,Dist,Dist)
pain.Transparency = 0
pain.Position = Vector3.new(0,0,0) --It wont go to 0,0,0 instead it moves it on top of the baseplate...
boom.Position = script.Parent.Position
boom.BlastPressure = 10
boom.DestroyJointRadiusPercent = 0
ting = false
wait (2)
ting = true
end
end
script.Parent.Touched:connect(Touch)

1 comment
Thank you so much! It worked with pain.CFrame = CFrame.new