Unable to cast double to coordinateframe?

I’m probably just stupid but this script gives me the error in the title, what did i do wrong?

local familyguy = game.Workspace
local brianlookout = familyguy.Clyde
local car = familyguy.Cheetos
local bals = car.CFrame

for i = 1,100000 do
	
	brianlookout:SetPrimaryPartCFrame(-69.25, 5, -122.5)
	wait(3)
	brianlookout:SetPrimaryPartCFrame(-66, 5, -94.5)
	wait(3)
	
	end
6 Likes

That is…A weird way of defining your variables, but alrighty then

The function SetPrimaryPartCFrame requires a CFrame Value, you can’t just set it with no constructor otherwise it assumes it’s a double data type is what it’s supposed to fill in

Also couldn’t you just do a while true do loop instead?

local BrianLookout = workspace.Clyde
local Car = workspace.Cheetos
local Bals = Car.CFrame

while true do
    BrainLookout:SetPrimaryPartCFrame(CFrame.new(-69.25, 5, -122.5))
    wait(3)
    BrainLookout:SetPrimaryPartCFrame(CFrame.new(-66, 5, -94.5))
    wait(3)
end
4 Likes

you right i was stupid as i thought lmaol

2 Likes

It’s completely fine, we tend to make mistakes all the time here so it’s no big deal really :sweat_smile:

3 Likes