im trying to make shift lock not able to be turned on when player is seated because its binding over my code and i want shift lock to be able to be turned on when player is unseated
code
local Seats = {
workspace["Model [2] Alpha Series of Class: Paired Dual Main Battery Station"].Seat,
workspace["Model [2] Bravo Series of Main Battery Class "].Seat,
workspace["Model [3] Charlie Series of Main Battery Class "].Seat
}
for i, Seat in pairs(Seats) do
local RemoteEvents = game.ServerStorage["Begin[N]End"]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local SeatProperty = Seat.Occupant
Seat.Changed:Connect(function(Properties)
local function OnSEAT(Player)
if SeatProperty ~= nil then
RemoteEvents.Parent = ReplicatedStorage
Player.DevEnableMouseLock = false
elseif Properties == "Occupant" and SeatProperty == nil then
RemoteEvents.Parent = ServerStorage
Player.DevEnableMouseLock = true
end
end
OnSEAT()
end)
end

4 comments
Sorry! I meant parameters / arguments not properties.
ohhhh you were sooo wrong i used server script it was kinda my fault
dont worry i used PlayersService.PlayerAdded:Connect(function(Player) to solve the problem
i didnt want exploiters to start touching those remote event