Let me get straight to the point, The tower rotates differently when the player is in the state of placing:
Preview:
https://gyazo.com/f7671e2b21a18d49b5e18f0f30fd2b73
Current Code:
script.Parent.MouseButton1Click:Connect(function()
if PlayerTowers == nil then return end
if isPlacing == false then
isPlacing = true
local TowerPreview = PlayerTowers:WaitForChild(ViewportFrame.Name)
towerBeingPlaced = TowerPreview:Clone()
towerBeingPlaced.Parent = workspace
Mouse.TargetFilter = towerBeingPlaced
PlacingEvent = RunService.RenderStepped:Connect(function(delta)
towerBeingPlaced.Level1.HumanoidRootPart.CFrame = Mouse.Hit + Vector3.new(0,0.5,0)
end)
elseif isPlacing then
PlacingEvent:Disconnect()
towerBeingPlaced:Destroy()
isPlacing = false
end
end)
I tried using CFrame.new() and using CFrame.Angles but I can’t get the rotation properly