Currently I’m trying to send a remote event to another script whenever w is pressed. There is another script that changes the “Throttle1” but for some reason the value does not get updated in this script and doesn’t send the updated value. Does anyone know how to make sure the value updates? Here’s the script:
local UIS = game:GetService("UserInputService")
local Plr = game.Players.LocalPlayer
local Character = Plr.Character or Plr.CharacterAdded:Wait()
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W then
while UIS:IsKeyDown(Enum.KeyCode.W) do
if Character.FlightSystemValues.Seated.Value == true and Character.FlightSystemValues.MinimumEngineStarted.Value == true then
local UpDown = "Up"
local PlaneName = game.Players.LocalPlayer.Character.FlightSystemValues.PlaneNonLiveryName.Value
local Throttle1 = Character.FlightSystemValues.Throttle1
game.ReplicatedStorage.FlightSystem.Throttle:FireServer(Plr, Character, UpDown, PlaneName, Throttle1)
end
task.wait(.05)
end
end
end)