What do you want to achieve? Keep it simple and clear!
need to transport text from a textbox (that i got from a local script) to a scirpt
What is the issue? Include screenshots / videos if possible!
its getting an instance, even though the text should be a string
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i did look, i have tried to use remotevents but that didn’t get me anywhere
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local script:
script.Parent:GetPropertyChangedSignal("Text"):Connect(function()
local text = script.Parent.Text
print(text)
local plr = game.Players.LocalPlayer
script.Parent.Parent.RemoteEvent:FireServer(plr,text)
end)
script:
local text2 = ""
script.Parent.MouseButton1Down:Connect(function()
print(text2)
game.Workspace["1"].d1.shirt.ShirtTemplate = "http://www.roblox.com/asset/?id="..string.match(text2,"%d+")
end)
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr,text)
text2 = text
end)
end)
You don’t have to fire over the Player (plr) object over to the server (it’s automatically already a parameter in the OnServerEvent function). The reason it’s printing “Instance” is because you’re attempting to print the Player object.