You really seem to do baby steps, don't you? ? I hope you do learn Lua this way, but I did a tiny mistake: remove the first argument to triggerClientEvent and set the (now) second argument to (in your case) vehicle. Honestly, I just try to play along with your code, even if you invent things! I helped you by putting the indicator type into the triggerClientEvent.
addEvent("onVehicleTurnOnIndicator", true);
addEventHandler("onVehicleTurnOnIndicator", root, function(rightindicator)
local vehicle = getPedOccupiedVehicle (client)
if vehicle then
triggerClientEvent ( "onClientVehicleTurnOnIndicator", vehicle, rightindicator)
end
end
);
addEvent("onVehicleTurnOffIndicator", true);
addEventHandler("onVehicleTurnOffIndicator", root, function(right_indicator)
local vehicle = getPedOccupiedVehicle (client)
if vehicle then
triggerClientEvent ( "onClientVehicleTurnOffIndicator", vehicle, right_indicator)
end
end
);
So this is the server-side portion of the script. Look at my advice again and try looking into the triggerServerEvent function for the client-side.
I am going to sleep now and will most likely be back tomorrow evening.