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
9 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****

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        script.LocalScript:clone().parent = character
    end)
end)

****Local Script****

local cam = workspace.CurrentCamera
local target = workspace.BasePlate
cam.CameraType = Enum.CameraType.Scriptable
cam.CameraSubject = target
local angle = 0

while wait() do
    cam.CoordinateFrame = CFrame.new(target,Position)
    *CFrame.Angles(0,angle,0)
    *CFrame.new(0,0,5)
    angle = angle + math.rad(1)
end
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 — 9y

1 answer

Log in to vote
2
Answered by 9 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