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

Attempt to call a boolean value problem how do I fix it?

Asked by 4 years ago

I'm trying to make the camera follow a part around but I have a problem, when I type in

1cam.Focus = CameraPart

It says

Players.longjohnnn.PlayerGui.ScreenGui.Start Frame.Play.Starter Script:19: bad argument #3 (CFrame expected, got Object)

But when I type in

1cam.Focus = CameraPart.CFrame

It says

attempt to call a boolean value.

Here is the whole script

01local Play = script.Parent
02Play.MouseButton1Up:Connect(function()
03    local StartFrame = script.Parent.Parent
04    local Settings = script.Parent:FindFirstAncestor("Settings")
05    spawn(StartFrame:TweenPosition(
06        UDim2.new (0.999, 0, -0.125, 0),
07        "Out",
08        "Back",
09        1,
10        false
11        ))
12local TempCar = game.Workspace:WaitForChild("TempCar")
13local CameraPart2 = TempCar.CameraPart2
14local cam = game.Workspace.CurrentCamera
15local CameraPart = TempCar.CameraPart
View all 21 lines...
0
when it says attempt to call a Boolean value, is that error also on line 19? Diamond52002 29 — 4y
0
Why not cam.CFrame = CameraPart.CFrame SethHeinzman 284 — 4y
0
It doesn't show where it is Longjohnnn 28 — 4y
0
Okay I did cam.CFrame and now it's working! thank you Longjohnnn 28 — 4y

Answer this question