Server not picking up my :fireserver()?
I have a GUI where the player presses start then it should fire a request to the server to set gamerunning to true But if i check the output the clients print does something but the server isn't printing that it recieved it and not setting gamerunning to true.
ServerSide
01 | local seat = script.Parent |
02 | local camera = game.Workspace.CurrentCamera |
03 | local alreadysend = false |
06 | if script.Parent.Occupant ~ = nil then |
07 | if alreadysend = = false then |
08 | local char = script.Parent.Occupant.Parent.Name |
09 | local plr = game.Players:FindFirstChild(char) |
10 | game.ReplicatedStorage.CameraEvent:FireClient(plr) |
14 | if script.Parent.Occupant = = nil then |
21 | game.ReplicatedStorage.StartGame.OnServerEvent:Connect( function () |
23 | script.Parent.Parent.Parent.gamerunning.Value = true |
25 | script.Parent.Parent.Parent.gamerunning.Value = false |
Clientside
01 | game.ReplicatedStorage.CameraEvent.OnClientEvent:connect( function () |
02 | local frame = script.Parent.Frame |
04 | frame.TextButton.MouseButton 1 Click:connect( function (plr) |
05 | game.ReplicatedStorage.StartGame:FireServer() |
08 | script.Parent.Timermoneyworth.Visible = true |
09 | local cam = game.Workspace.CurrentCamera |
10 | print ( 'clienteventcam' ) |
11 | cam.CameraType = 'Attach' |
12 | cam.CameraSubject = game.Workspace.Minigameplanet.Galaxy.campart |
13 | game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0 |
15 | script.Parent.Parent.sounds.LocalScript.Disabled = true |
16 | script.Parent.Parent.sounds.s 1 :Pause() |
17 | script.Parent.Parent.sounds.s 2 :Pause() |
18 | script.Parent.Parent.sounds.s 3 :Pause() |
19 | script.Minigamesound:Play() |
22 | local timer = script.Parent.Timermoneyworth.Timer |
28 | game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50 |
29 | game.Players.LocalPlayer.Character.Humanoid.Jump = true |
30 | script.Parent.Timermoneyworth.Visible = false |
31 | script.Parent.Parent.sounds.LocalScript.Disabled = false |
32 | script.Minigamesound:Stop() |
If anybody could tell why my script isn't working it would be appriciated.