im making a fighting game where u can chose a character from a list like everyone so there can be multiple of the same character it works but when a second person clicks the button it teleports them inside the first person who got the character heres the script:
theres a local side but thats simple:
While it could be due to players having the same name, That’s not why I’m commenting this.
I noticed you using game.StarterGui
which actually doesn’t work.
When the player joins a game, everything in the StarterGui is cloned to the player’s PlayerGui.
StarterGui just stuff until the player joins, meaning that changing a value there doesn’t actually change it for the player.
Instead, you should use player.PlayerGui
, player
is of course, the localplayer that you receive from the remoteEvent.
its not due players having the same name but thanks for helping me with an error
local part = script.Parent local character = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent local characterbutton = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent local characterlist = script.Parent.Parent.Parent.Parent.Parent.Parent local charactergui = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.CharacterGUI local charactermodel = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.CharacterModel local characterstats = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.CharacterStats part.MouseButton1Click:Connect(function() if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == true then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == false then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == true then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == false then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == true then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == false then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == true then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == false then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == true then if part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value == false then part.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Selected.Value = true local char = part.Name local characterlist = script.Parent.Parent.Parent.Parent.Parent.Parent local charactergui = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.CharacterGUI local charactermodel = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.CharacterModel local characterstats = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.CharacterStats characterlist:Wait