Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my cloned part not rotating correctly?

Asked by 5 years ago

I have it so that it clones the part that is saved in ReplicatedStorage and then places it on the player. Although everything works properly the garden is being placed sideways for whatever reason. When I rotate it by using GardenO.Rotation it's still being placed sideways. Any help?

game.Workspace.RosadaRemote:FindFirstChild("Garden").OnServerEvent:Connect(function(Player, Debounce)
 local deb = false
 local AlreadyTouched = false
 local Character = Player.Character or Player.CharacterAdded:Wait()
 Debounce = true
 local Garden = game:GetService("ReplicatedStorage"):FindFirstChild("Garden")
 local GardenO = Garden:Clone()
 GardenO.Name = "Garden"
 GardenO.Parent = game.Workspace
 GardenO.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,-5,0)
 GardenO.Rotation = Vector3.new(0, -120.32, -90)
 local BV = Instance.new("BodyVelocity")
 BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
 BV.Velocity = Character.HumanoidRootPart.CFrame.lookVector*0
 BV.Parent = GardenO
0
Try math.rad(-90) at lines 11 NiniBlackJackQc 1562 — 5y
0
No ^ DeceptiveCaster 3761 — 5y
0
GardenO.Rotation = Vector3.new(0,-120.32,math.rad(-90)? songboy50 77 — 5y
0
Vector3 doesn´t use radians. Rotation is just the current rotation as a Vector3, it doesn´t need radians. DeceptiveCaster 3761 — 5y

Answer this question