Question by
nessie2013 · Aug 08, 2017 at 05:51 PM ·
uimultiplayer
islocalplayer stopping buttons working
when i use (!islocalplayer) my button no longer does anything`
This code works public void StartGame() {
//InGameCanvas.SetActive(true);
SceneManager.LoadScene("Main");
transform.position = Spawn.position;
transform.rotation = Spawn.rotation;`
}
This code doesnt work
public void StartGame()
{
if (!isLocalPlayer)
{
SceneManager.LoadScene("Main");
transform.position = Spawn.position;
transform.rotation = Spawn.rotation;
}
}
No errors come up and all non code using islocalplayer works fine. Any help would be nice
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612132254im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
EventTrigger OnPointerUp Slider Snap Back to Zero? 0 Answers
Detect which prefab triggers the button UI 1 Answer
Unity 5.2 - How can I keep other players from using a menu? 0 Answers
Local multiplayer character selection screen on same Pc 1 Answer
Problem: Mirror/UNET - No authority on object even when using Command & ClientRpc 0 Answers