When I have selected "Character2" in the in game menu, it works ok, but my friend who is on a different class called "empress", which has a different weapon and animation to go for it. Could someone help me figure out why me being selected to the "Character2" class caused my friend's character to load the wrong model?
script is also located in serverscript service. Is it possible to do this on the client?
#Does anyone know why the game loads the wrong weapon?
1 messages · Page 1 of 1 (latest)
Could you use this format: ``lua
because of your cosmic dum in using shared variables in context specific situations ```lua
local charVariable
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Wait()
charVariable = player
end)
Players.PlayerAdded:Connect(function(Players)
Players.CharacterAppearanceLoaded:Connect(function(Character)
if charVariable:WaitForChild("CurrentCharacter").Value == "Character1" then
return```
why on earth do you have 2 connections to playeradded for starters, and second, why is charVariable split like this, that's bound to screw things up.
use the parameters you get from PlayerAdded and CharacterAdded/Loaded events like a normal person. ```lua
Players.PlayerAdded:Connect(function(Players)
Players.CharacterAppearanceLoaded:Connect(function(Character)```