Fly admin command not working

  1. What do you want to achieve? I’m trying to make a fly command like Adonis or Kohls.

  2. What is the issue? I used an BoolValue cause I know you can’t make it in a Server Script so I made it if the BoolValue is true then the flying script will activate and a RemoteEvent to know when the flying has stopped. image

commands.fly = function(sender, args)
	
			local addOns = game.StarterGui.AddonCommands
		
			local FlyingStopRe = addOns.FlyingStopped
			local Flying = addOns.Flying
	
	
			Flying.Value = true
			
			FlyingStopRe.OnServerEvent:Connect(function()
				
				Flying.Value = false
				
			end)		
	
	
	
end
  1. What solutions have you tried so far? I looked everywhere and I couldn’t find any topics similiar to this, hope you guys could help?

If you want more details just lmk I can respond.

I’m not asking for the script, just asking what could I do or what I did wrong.

Remote events should be put into the replicated storage.
I also recommend using :WaitForChild(“RemoteEvent”).

1 Like

All right I will test it out. But the problem is not stopping the flying, it’s not starting up at all :confused:

Yes. If the event is in the wrong location then it wont be able to fire properly. This means you can fire it all you want and nothing will happen at all.

I’m not using an event to start it,I’m using a bool value.

Oh I know what I did wrong, the function is not firing at all, that’s why nothing was happening.

Edit: Still nothing, it says it’s supposed to run the function but it’s not :confused: