Hello I wanted to know how I would fix this script so it can apply the text from client → server on a tool
Client
local RS = game:GetService("ReplicatedStorage")
local ChangeText = RS:WaitForChild("ChangeText")
local player = game.Players.LocalPlayer
local TextFrame = script.Parent.TextFrame
local TextBox = TextFrame.TextBox
local ApplyText = TextFrame.ApplyText
local OpenMenu = script.Parent.OpenMenu
function ApplyTheText()
if player.Backpack:FindFirstChild("TextSign") then
ChangeText:FireServer(player,TextBox)
end
end
ApplyText.MouseButton1Click:Connect(ApplyTheText)
Server
local RS = game:GetService("ReplicatedStorage")
local ChangeText = RS:WaitForChild("ChangeText")
ChangeText.OnServerEvent:Connect(function(player,TextBox)
if player.Backpack:FindFirstChild("TextSign") then
for _, Text in pairs(player.Backpack:GetDescendants()) do
if Text:IsA("TextLabel") then
Text.Text = TextBox.Text
end
end
end
end)
And the tool has this in it