I just want to set the model’s rotation to it’s default. In order to do that I need to figure out how to get the rotation of it. Help!!!
local RS = game:GetService("ReplicatedStorage")
local maskUp = RS.MaskUp
maskUp:GetPropertyChangedSignal("Value"):Connect(function()
if maskUp.Value == false then
for _, v in pairs(script.Parent:GetChildren()) do
if v.Name ~= "Primary" then
v.Transparency = 1
end
end
script.Parent:SetPrimaryPartCFrame(CFrame.fromEulerAnglesXYZ(0,1,0)) --Here I want to set it to the default
else
for _, v in pairs(script.Parent:GetChildren()) do
if v.Name ~= "Primary" then
v.Transparency = 0
end
end
for i = 0, 15, 1 do
wait()
script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame()*CFrame.fromEulerAnglesXYZ(-0.1,0,0))
end
end
end)
local RS = game:GetService("ReplicatedStorage")
local maskUp = RS.MaskUp
local pivot = script.Parent:GetPivot()
maskUp:GetPropertyChangedSignal("Value"):Connect(function()
if maskUp.Value == false then
for _, v in pairs(script.Parent:GetChildren()) do
if v.Name ~= "Primary" then
v.Transparency = 1
end
end
script.Parent:PivotTo(pivot)
else
for _, v in pairs(script.Parent:GetChildren()) do
if v.Name ~= "Primary" then
v.Transparency = 0
end
end
for i = 0, 12, 1 do
wait()
script.Parent:SetPrimaryPartCFrame(script.Parent:GetPrimaryPartCFrame()*CFrame.fromEulerAnglesXYZ(-0.12,0,0))
end
end
end)