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 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.
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.
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)