RemoteFunction not starting

Server side

		print("Start")
		local pepe = script.Parent.TurnCamera:InvokeClient(player , Part)
		print("End")

Client Side

script.Parent.OnClientInvoke = function(Part)
	print("Function")
	game.Players.LocalPlayer.PlayerScripts.Cmera.Disabled = true
	for i = 1,400 do
		local CameraPart = Part.Parent.PlayerSphere
		local c = 0


		local cframe = CameraPart.CFrame * CFrame.Angles(0, math.rad(c), 0) * CFrame.new(0, 0, -5) 
		
		
		cframe = CFrame.new(cframe.p, CameraPart.Position)
		workspace.CurrentCamera.CFrame = cframe;

		c = c + 3;
		wait()
	end
	
	return nil
end

Yes I know for some reason this is not a good idea but i have no choice. it prints out “Start” and nothing after.

Is there at least any errors? (30)

Is Script.Parent in the Client side the RemoteFunction connection? If not then replace Script.Parent with whatever you named the RemoteFunction connection.

No. there aren’t any error mainly because the code does not seem to run.

Yes, that is correct. :shallow_pan_of_food:

Why did you put the script inside the connection? I’m not sure if it would work if the RemoteFunction isn’t inside ReplicatedStorage.

Aaand I just remembered localscripts don’t run in workspace…
For the fifth freaking time

1 Like