So I want to make book tool which open and closing. But problem with Cframe.Angles. when I activated first time script set -90 in grip. And when i activated second time script put 90* to z axis. When I need in X axis. What am I do wrong?
local tool = script.Parent
local activated = false
tool.Activated:Connect(function()
if(not(activated))then
tool.Handle.Mesh.MeshId = "rbxassetid://18518129841"
tool.Grip = CFrame.new(0,0,1.3) * CFrame.Angles(0,math.rad(-90),0)
activated = true
else
tool.Handle.Mesh.MeshId = "rbxassetid://18518188093"
tool.Grip = CFrame.new(0,0,0) * CFrame.Angles(math.rad(90),math.rad(90),0)
activated = false
end
end)
Here is video_explanation