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

Why doesn't my camera shake? Works on Solo!

It works fine in Solo mode but when I try and play it normaly it will not work? Any help? My script is a normal script. Thanks! :) Credit will be given at my game :)

function shake()
	local camera = game.Workspace.CurrentCamera
	for i = 1,10 do	
		wait()
		camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,2,0)
		wait()
		camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,-2,0)
	end 
end 

while true do 
	wait(0.01)
	shake()
end 

1 answer

✓ Accepted answer

A player's camera can only be manipulated by a LocalScript. The reason it worked in solo mode with a "normal script" is due to the fact that everything is locally loaded in that test mode.

Simply put the contents of the script into a LocalScript and place it somewhere within the player, such as their PlayerGui (via StarterGui).

2 comments

0

Okai let me try ;)

0

Yep. Works great! Thank you! :)

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