i have this script:
script.Parent.Spawn1:GetPropertyChangedSignal("Text"):Connect(function()
local towerName = script.Parent.Spawn1.Text
local towerTemplate = game.ReplicatedStorage.Towers:FindFirstChild(towerName)
if not towerTemplate then return end
if script.Parent:FindFirstChild("TowerPicture") then
script.Parent.TowerPicture:Destroy()
end
local newtower = towerTemplate:Clone()
newtower.Parent = script.Parent
newtower.Name = "TowerPicture"
if newtower:IsA("Model") then
local primaryPart = newtower:FindFirstChild("PrimaryPart")
if not primaryPart then
primaryPart = newtower:FindFirstChildOfClass("BasePart")
if primaryPart then
newtower.PrimaryPart = primaryPart
end
end
if newtower.PrimaryPart then
local position = Vector3.new(0, 13.61, 17.18)
local rotation = CFrame.fromEulerAnglesYXZ(
math.rad(23.938),
math.rad(177.623),
math.rad(-1.779)
)
newtower:SetPrimaryPartCFrame(CFrame.new(position) * rotation)
end
end
end)
but for some reason when it does happen the coords are different