I don't get any errors, but however the camera won't change, it's like if i have not scripted anything

Server Script

local theTable = {}
local remote = game.ReplicatedStorage.RemoteEvent

workspace.Part.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		print(hit.Parent.Name.." Joined the table")
		table.insert(theTable, hit.Parent)
	end
end)

workspace.button.ClickDetector.MouseClick:Connect(function(click)
	if table.find(theTable, click.Parent) then
	remote.OnServerEvent:Connect(function()
	end
   end)
end)

Local Script

local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local remote = game.ReplicatedStorage.RemoteEvent

camera.CameraType = Enum.CameraType.Scriptable
camera.Focus = workspace.button
remote:FireServer(player)

1 comment

0

Switch around the if then statement with the remote onServerEvent