local bin = script.Parent
local char = script.Parent.Parent.Parent.Character
local carCreated = false
local owner = workspace.CurrentCamera
function setCamera(subject, time)
while true do
wait(time)
owner.CoordinateFrame = subject.CFrame
end
end
local function hSelect(m)
local function bdown()
print("Button1Down")
local car = game.Lighting.Car:clone()
if car ~= nil and char ~= nil and carCreated ~= true then
car.Parent = workspace
car:moveTo(char.Torso.Position + Vector3.new(5, 5, 5))
owner.CameraSubject = car.Spoiler
owner.CameraType = "Follow"
carCreated = true
wait(2)
thread = coroutine.create(setCamera)
assert = coroutine.resume(thread, car.Spoiler, 0.1)
print(coroutine.status(thread))
else return
end
end
m.Button1Down:connect(bdown)
end
bin.Equipped:connect(hSelect)
Whenever I spawn the car, after a while y screen goes white. The ROBLOX Client, I mean :\ |