I can't identify the error, RS won't specify me the error and the camera it's not rotating around the baseplate. ****Script****
1 | game.Players.PlayerAdded:connect( function (player) |
2 | player.CharacterAdded:connect( function (character) |
3 | script.LocalScript:clone().parent = character |
4 | end ) |
5 | end ) |
****Local Script****
01 | local cam = workspace.CurrentCamera |
02 | local target = workspace.BasePlate |
03 | cam.CameraType = Enum.CameraType.Scriptable |
04 | cam.CameraSubject = target |
05 | local angle = 0 |
06 |
07 | while wait() do |
08 | cam.CoordinateFrame = CFrame.new(target,Position) |
09 | *CFrame.Angles( 0 ,angle, 0 ) |
10 | *CFrame.new( 0 , 0 , 5 ) |
11 | angle = angle + math.rad( 1 ) |
12 | end |
You don't need to clone the LocalScript
every time they spawn.
All you have to do is put it in the StarterPack
, the scripts in StarterPack
clone to the player's Backpack
every time they spawn, thus they run automatically.