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

I can't identify the error, may somebody help me?

Asked by
Xianon 105
10 years ago

I can't identify the error, RS won't specify me the error and the camera it's not rotating around the baseplate. ****Script****

1game.Players.PlayerAdded:connect(function(player)
2    player.CharacterAdded:connect(function(character)
3        script.LocalScript:clone().parent = character
4    end)
5end)

****Local Script****

01local cam = workspace.CurrentCamera
02local target = workspace.BasePlate
03cam.CameraType = Enum.CameraType.Scriptable
04cam.CameraSubject = target
05local angle = 0
06 
07while 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)
12end
0
Localscripts shouldn't be used from the Character. Get rid of the script and put the LocalScript in a place connected to the client; e.g. StarterPack, StarterGui Goulstem 8144 — 10y

1 answer

Log in to vote
2
Answered by 10 years ago

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 Backpackevery time they spawn, thus they run automatically.

Ad

Answer this question