You first trigger Server event like this, which is right
triggerServerEvent ("checkValidAct",localPlayer,localPlayerName) --Check if they have an account to log in to...
But then you trigger it with source being root element
triggerServerEvent("SubmitLogin",localRootElement,guiGetText(edtUser),guiGetText(edtPass))
When the source is root element (not the localplayer), then the source here
if (tryToLog) then
outputChatBox(welcomeMessageReturningUser,client)
triggerClientEvent(source,"clientLoginSuccess",getRootElement())
else
triggerClientEvent(source,"clientDisplayArea",getRootElement(),"Incorrect password, please try again.")
triggerClientEvent(source,"clientWrongPassword",getRootElement())
end
is also root element, as the event you triggered called this function.. So it triggers this client side event for all clients. What you have to do is change
triggerServerEvent("SubmitLogin",localRootElement,guiGetText(edtUser),guiGetText(edtPass))
into
triggerServerEvent("SubmitLogin",localPlayer,guiGetText(edtUser),guiGetText(edtPass))
And that for all the triggerServerEvents that you use there.. If you want the source to be the local player
Makes more sense?