I'm not very good at CFrame but it's supposed to move you .01 studs every time you click, I think it gets stuck somewhere. the script is located in a click detector.
script.Parent.MouseClick:Connect(function() local wheel = script.Parent.Parent wheel.Anchored = false if game.Workspace.Union.Value == 88 then wheel.CFrame = wheel.CFrame + CFrame.new(0,.01,0) end end)
I'll start off by saying CFrame is wack at first. When moving parts using CFrame, the parts move based on their own XYZ axis, not the global one. (The global axis is the default axis, the part's axis accounts for the rotation of the part).
In addition, to move a part, you need to multiply the CFrames.
wheel.CFrame = wheel.CFrame * CFrame.new(0,.01,0)
you can mess around with the CFrame numbers to refine how the wheel moves. If you need to rotate the wheel using CFrame, try this:
wheel.CFrame = wheel.CFrame * CFrame.Angles(math.rad(deg),math.rad(deg),math.rad(deg))
you replace "deg" with the number of degrees you want rotated for that axis. "math.rad" is required because CFrame.Angles() defaults to radians.
For more info see this:https://developer.roblox.com/en-us/api-reference/datatype/CFrame
If you need more assistance, reach out to me @BlobMaster#8156 or message me on roblox. Pls only do this for questions related to this topic.
I hope you found this helpful. Till next time.