i believe script.parent.parent means its the model the location is:game<workspace<pully<meshpart<script heres the script and error message
1 | function pull_up_then_down() |
2 | script.parent.parent:SetPrimaryPartCFrame(CFrame = = Vector 3. new(- 28.688 , 9.34 , - 25.841 )) |
3 | end |
4 | script.Parent.ClickDetector.MouseClick:Connect(pull_up_then_down) |
20:21:10.204 - Unable to cast bool to CoordinateFrame
Hello. The problem is that you used Vector3
on a CFrame. Also, when setting a CFrame, you mustn't use CFrame = Vector3.new(X, Y Z)
as it's just not how it works, and you cannot set a value of a Roblox global. Try this:
1 | local function pull_up_then_down() |
2 | script.Parent.Parent:SetPrimaryPartCFrame(CFrame.new(- 28.688 , 9.34 , - 25.841 )) |
3 | end |
4 |
5 | script.Parent.ClickDetector.MouseClick:Connect(pull_up_then_down) |
Please accept and upvote this answer if it helped.