How I can switch the StateAuthority?
Options
Answers
-
I think this is only possible in shared mode, in that case you can use request state authority:
public async void GetAuthority() {
if(Runner.IsSharedModeMasterClient) {
Object.RequestStateAuthority();
while(Object.HasStateAuthority == false)
await Task.Delay(100); // wait for Auth transfer
//do stuff with your new authority
}
}
Otherwise the server probably needs to handle whatever it is you want to do
0