Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

1 comment

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

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.