local module = {}
local Directory = {
Monster = {
["Flower1"] = {
End = CFrame.new(-203.79, 6.395, -96.96);
Focus = CFrame.new(-232.4, 6.395, -96.96);
Time = 2
};
["Part"] = {
End = CFrame.new(-203.79, 6.395, -51.57);
Focus = CFrame.new(-235.05, 6.395, -51.57);
Time = 1
}
}; -- Monster Closer
Powers = {
["part2"] = {
End = CFrame.new(543, -4,54);
Focus = CFrame.new(54, -3, 435);
Time = 2
}
};
} --Directory Closer
function module.Cam(Location, Camera, Option)
Camera.CameraType = Enum.CameraType.Scriptable
Camera:Interpolate(Directory[Option][tostring(Location)].End, Directory[Option][tostring(Location)].Focus, Directory[Option][tostring(Location)].Time)
end
return module
A location is the location of the part that was touched, camera is the normal camera and option is if it is either a monster or power. I use collectionservice to set the values between monsters and powers.
Overall, is this good organized?
