Hi everyone,
I recently began working on my transporter and one of its core feature is the openable trunk for mailman, officers,… to work.
The problem I face is that the trunk doesnt open.
local Hinge = script.Parent.Pivot
local opened = false
function Open()
if opened == false then
opened = true
for i = 1, 18 do
script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(5), 0))
wait()
end
else
opened = false
for i = 1, 18 do
script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(-5), 0))
end
end
end
script.Parent.paint5.ClickDetector.MouseClick:Connect(Open)
- No logs in console
- Tried already with TweenService, also didnt work
- Watched various YouTube tutorials, didn’t work either
- Copied the car into a brand new baseplate, nothing changed
- Printed :SetPrimaryPartCFrame (all I get is nil, nothing else, is that normal?)
For your info: I checked the script many times, everything is correct. I checked the Roblox Docs too to see if I did a mistake but it should work according to the docs.
Everything of the script works. It just doesnt do the stuff its meant to do at the :SetPrimaryPartCFrame line.
Thanks in advance for any help.