(Disclaimer: This is the last post I will ever make on the devForums)
So here is what the player does, there is a textbox, player enters userid, player presses change char button, doesn’t work.
It is so annoying, it hasn’t been working for 40 minutes now.
Code (The Event Code [In A Server Script])
game.ReplicatedStorage.ChangeChar.OnServerInvoke = function(id, player)
local idMain = tonumber(id)
player.CharacterAppearanceId = idMain
player:LoadCharacter()
end
Code 2 (The UserId getter and event fire-er [In A Local Script])
script.Parent.MouseButton1Click:Connect(function(changeChar)
local id = tonumber(script.Parent.Parent.Input.Text)
local player = game.Players.LocalPlayer
game.ReplicatedStorage.ChangeChar:InvokeServer(id, player)
end)
Please help, this has been happening 40 minutes (like I said) and is giving me a coding headache
This is the error that it returns:
Attempt to index number with 'CharacterAppearanceId'