How To Fix This Error

I am trying to make a sign and everything works fine but and error come up saying

"CreateMsg is not a valid member of ScreenGui “Players.Cyber_Designer.Backpack.Sign.SignGui”

The problem is that the error come up because the sign is in the players back pack and not on the player in workspace. The script works fine when it is in work space and works fine. How do I fix it.

local player = game.Players.LocalPlayer

local TextMsg = script.Parent.CreateMsg:WaitForChild("TextMsg")

TextMsg.Changed:Connect(function()
	if player.Character:FindFirstChild("Sign") then
		player.Character["Sign"]:WaitForChild("UpdateSign"):FireServer(TextMsg.Text)
	end
end)

I dont think you send part of code that is making error…

This is the part but this script goes and the player has not equipped the sign yet

If player didnt equiped sign then it wont fire remote because of this line

I know I am trying to make the error go away. I need a script to check if the sign is in the player’s backpack and if does then it will go thought the script. I just don’t know how to make a check on this script.

It is alredy on client side but server script dont have it (probably)

1 Like

What do you mean---------------

1 Like

I believe you need to put the script that places the sign in the StarterPlayer Service or into their StarterPack.
This will load the scripts or instances required in each Player or Character in the game.

1 Like

When I do that this comes up
CreateMsg is not a valid member of PlayerScripts “Players.Cyber_Designer.PlayerScripts”

1 Like

The sign in in the StarterPack

1 Like

Ok I don’t know what happen but I put it in StarterPlayerService and it did not work so I put it back and now there are now errors???

1 Like

Yes, but how are you placing the item in the Player? It it’s in their BackPack why not get your script to check for it there instead of in Player.?

1 Like

That is what I want but i don’t know how to do that

1 Like

Maybe you had a space in the name or a spelling error originally and when you put it back you fixed the issue.

1 Like

i assume you have used toolbox sign gear to give every player. try this:

local sign = player.Backpack:FindFirstChild("Sign")

if sign then
	sign.Parent = workspace
end

You can use the script I provided in a new Script object in the Workspace or ServerScriptService
This script finds the sign in the player’s backpack and moves it to the workspace.

im not sure if it will work tho cuz i did it under minute, and i found the same sign gear from toolbox and will see lol

Also about the same toolbox, but its for “script”: |Server|Unable to assign property Text. string expected, got nil||
| — | — | — |
|Script 'Players.<Player>.Backpack.Sign.Script', Line 15|

solution (ig):


script.Parent.Unequipped:Connect(function()
	script.Parent.SignPart.SurfaceGui.TextLabel.Text = ""
end)

script.Parent.UpdateSign.OnServerEvent:Connect(function(player,msg)
	if player.Character:FindFirstChild("Sign") then

		local fithered
		local success, errorMessage = pcall(function()
			fithered = chat:FilterStringAsync(msg,player,player)
		end)

		if not success then
			-- Handle error here
			fithered = "Error occurred while filtering string"
		end

		script.Parent.SignPart.SurfaceGui.TextLabel.Text = fithered
	end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.