Changing text script not working

What I have right now is a tool. When the tool is equipped, it gets put in the PlayerGui. In the gui, there is a textbox and a button. The textbox is what you want the sign’s text to be changed to. When you press the button, it fires a remote event which is supposed to change the player’s sign text. But in the ServerScript, it can’t find the player’s backpack. Anyone able to help?

LocalScript (in the playerGui when the tool is equipped)

script.Parent.MouseButton1Click:Connect(function()
	game.ReplicatedStorage.ChangeSignText:FireServer(script.Parent.Parent.TextBox.Text)
end)

ServerScript (in ServerScriptService)

game.ReplicatedStorage.ChangeSignText.OnServerEvent:Connect(function(player, text)
	player.Backpack["Protest Sign"].Handle.Sign.SurfaceGui.TextLabel.Text = text
end)

When tools are equipped they are parented to their character, and since you said that it only happens when you equip it, maybe try this?

game.ReplicatedStorage.ChangeSignText.OnServerEvent:Connect(function(player, text)
	player.Character["Protest Sign"].Handle.Sign.SurfaceGui.TextLabel.Text = text
end)
1 Like