Basically, i am making a script to change a value in ReplicatedStorage to something is written on a TextBox but i can’t seem to figure it out, can someone help me here please?
LocalScript:
local button = script.Parent
local box = script.Parent.Parent.TextBoxA
local event = game.ReplicatedStorage.Events.Setpoints_A
button.MouseButton1Click:Connect(function()
local text = box.Text
event:FireServer(text)
end)
Script:
game.ReplicatedStorage.Events.Setpoints_A.OnServerEvent:Connect(function(text)
game.ReplicatedStorage.Event.Value = text
end)
The output Says: invalid argument #3 (string expected, got Instance)