Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does camera attach before the parts touch eachother?

Asked by
skyab12 25
8 years ago
Edited by M39a9am3R 8 years ago

So I am trying to attack the camera to the Ball part when it hits the Replay1 part but this code already attaches the camera to the ball before it touches.

local Replay1= game.Workspace.Replay1
 if workspace.Ball.Touched:connect(function(Replay1)
    end)

then

local camPart = workspace.Ball
repeat wait() until game:service("ContentProvider").RequestQueueSize ==0

local cam = workspace.CurrentCamera
cam.CameraSubject =camPart
cam.CameraType= Enum.CameraType.Attach

else 

local camPart = workspace.Ball
repeat wait() until game:service("ContentProvider").RequestQueueSize ==0

local cam = workspace.CurrentCamera
cam.CameraSubject =camPart
cam.CameraType= Enum.CameraType.Attach

    end
0
Are you using a Local Script, and if so, where is the script located. Also, could you edit your code for a code block? User#11440 120 — 8y
0
Local script in starterGUI skyab12 25 — 8y
0
Edited for code block. In the future, please make a code block with the Lua button in creating or editing of posts. M39a9am3R 3210 — 8y

Answer this question