So I'm trying to make a character selection thing, but it's not working. It works perfectly in studio, but not in a server.
Server Script:
function Events.CharacterChange.OnServerInvoke(plr, class)
local char = game.ReplicatedStorage.Characters:findFirstChild(class["Name"]):Clone()
char.Parent = workspace
char.Name = plr.Name
char:FindFirstChild("Health").Disabled = false
char:FindFirstChild("Sound").Disabled = false
plr.Character = char
return true
end
Local Script
script.Parent.Select.MouseButton1Click:connect(function()
script.Parent.Select.Visible = false
local chart = Events.CharacterChange:InvokeServer(Characters[index])
repeat wait() until chart
print("char")
local char = game.Players.LocalPlayer.Character
char:FindFirstChild("Animate").Disabled = false
workspace.CurrentCamera.CameraType = "Custom"
workspace.CurrentCamera.CameraSubject = char.Humanoid
workspace.CurrentCamera.CFrame = char.HumanoidRootPart.CFrame
end)
It prints 'char' in studio, but it doesn't print anything in a server. The camera subject remains a part in workspace, and the camera type is still Scriptable. Also the animation script doesn't execute in a server, but in studio. No errors, the output is clean. The server script executes, so the problem is with the local script.

3 comments
Well yea on the client if your going for that. It won't print on the server because you're doing that on the client. is the problem you don't know what the problem is? is it invoking from the server?