Basically there is a function inside of a button. Said function is supposed to send the texture ID that is typed into a textbox to display on a decal. But for some reason i'm getting this error: Text is not a valid member of Player
Can someone please help?
Client
local textboxtext = script.Parent.Parent.TextBox script.Parent.MouseButton1Click:Connect(function(textboxtext) game.ReplicatedStorage.LoadDecal:FireServer(textboxtext) end)
Server
game.ReplicatedStorage.LoadDecal.OnServerEvent:Connect(function(textboxtext) game.Workspace.TVTron.Decal = "rbxassetid://"..textboxtext.Text print("event fired!") end)
Broken client:
local textboxtext = script.Parent.Parent.TextBox script.Parent.MouseButton1Click:Connect(function(textboxtext) game.ReplicatedStorage.LoadDecal:FireServer(textboxtext)--Doesn't work because GUI's in StarterGui don't load in for the server. end)
Fixed client:
local textboxtext = script.Parent.Parent.TextBox script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.LoadDecal:FireServer(textboxtext.Text)--Sends the text instead of TextBox, this way the server can actually read it. end)
Fixed server:
game.ReplicatedStorage.LoadDecal.OnServerEvent:Connect(function(player, textboxtext) game.Workspace.TVTron.Decal = "rbxassetid://"..textboxtext print("event fired!") end)