You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to have a variable set from a textbox’s contents, from two text boxes. -
What is the issue? Include screenshots / videos if possible!
I use local Username = (script.Parent.Parent.username.Text) but still get an error -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried many solutions, and many tries at defining the textbox’s location.
function leftClick()
local Player = script.Parent.Parent.Parent.Parent
local name = (Player.Name)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local reportmusic = ReplicatedStorage:WaitForChild("reportmusic")
local reason = (script.Parent.Parent.Text)
local Username = (script.Parent.Parent.username.Text)
reportmusic:FireServer(reason, Username)
end
script.Parent.MouseButton1Click:Connect(leftClick)
