server side
for i = 1, #players do
CAMERA:FireClient(players[i])
CLOSEGUI:FireClient(players[i])
end
client side
CLOSEGUI.OnClientEvent:Connect(function()
local frame = game:GetService("Players").LocalPlayer.PlayerGui.Main.Frame
local P1 = frame.P1:GetChildren()
local P5 = frame.P5:GetChildren()
local P6 = frame.P6:GetChildren()
for i = 1, 2 do
P5[i].Visible = false
P6[i].Visible = false
end
for i = 1, #P1 do
P1[i].Visible = true
end
frame.Visible = false
end)
CAMERA.OnClientEvent:Connect(function()
local character = game:GetService("Players").LocalPlayer.Character
if character then
local root = character:FindFirstChild("HumanoidRootPart")
if root then
local characterCFrame = root.CFrame
local cameraOffset = characterCFrame.LookVector * 9 + characterCFrame.UpVector * 6
local cameraPosition = characterCFrame.Position + cameraOffset
local pos = Instance.new("Part")
pos.Anchored = true
pos.CFrame = CFrame.new(cameraPosition)
pos.Transparency = 1
pos.Parent = workspace
workspace.CurrentCamera.CameraSubject = pos
end
end
end)
players is a table of players
problem: CAMERA event is completely ignored by the server script, prints inside it arent shown, CLOSEGUI event is executed normally
if i put the function from CAMERA event inside CLOSEGUI, it works, but i dont want to link both on the same event
did the opposite and put both functions on CAMERA event, nothing executed
fired CLOSEGUI before CAMERA, same problem
changed CAMERA event name to something else, still nothing
fired CAMERA event from another FOR loop, still nothing
** You are now Level 5! **