Why is the part not moving? used cframe and position.
LOCAL SCRIPT inside of startergui
I'm making a button, when it's touched a client event fires and that part works fine but the onClientEvent function isn't working properly. I made it so when the player touches first time the ball gets inserted into workspace, the 2nd time he touches it, it makes the ball go to the position it was placed at if it moves. I used CFrame and Position to move it but they both didn't work.
03 | PE 3. OnClientEvent:Connect( function () |
04 | local activatedPart = game.ReplicatedStorage:WaitForChild( "Ball" ) |
06 | print ( "Button activated" ) |
08 | local ballCopy = activatedPart:Clone() |
10 | if locate = = true then |
13 | ballCopy.Parent = game.Workspace |
15 | elseif locate = = false then |
18 | ballCopy.CFrame = CFrame.new(- 3235.872 , 480.378 , 502.991 ) |
and no there isn't any errors in the workspace, prints? yes.
ty for help