What method are you using to confirm text entry in your TextBox?
Itās not the problem, if thereās should to be any problems with it, script should to say that thereās problem in 6th line, but it isnāt say anything
Clicking on the button, that called FeedbackButton
Then that explains 100% why the scripts arenāt working. Iāll need to see the gui in your explorer to know where the textbox and feedbackbutton are though
You want to say that Iām need to change this two lines to onClicked function?
Itās best to show me the location of your feedbackbutton and textbox in your explorer if possible, please
Iāll send you remaked script, when I test if itās working, because I just do it
Essentially this is how youāll need to change the LocalScript:
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local feedbackButton = -- Where the FeedbackButton you click is located
local textBox = -- Where the TextBox you use to enter text is located
local remoteEvent = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("FreshCutGiveawayBadge")
local function onActivated()
if string.find(textBox.Text, "#freshcutgiveaway") then remoteEvent:FireServer() end
end
feedbackButton.Activated:Connect(onActivated)
Itās my script, and itās finally working:
local ReplicatedStorage = game:GetService(āReplicatedStorageā)
local textBox = script.Parent
local remoteEvent = ReplicatedStorage.Remotes:WaitForChild(āFreshCutGiveawayBadgeā)
script.Parent.Parent.FeedbackButton.MouseButton1Click:Connect(function()
if string.find(textBox.Text, ā#freshcutgiveawayā) then
remoteEvent:FireServer()
end
end)
Iād recommended to type .MouseButton1Click:Connect(function() when you want to make something when you press on the button, because it takes only two lines.
And also, itās too fast and easy to do
Do you know how to change my devforumās avatar?
In your case you can simply write this if you prefer:
textBox.Parent.FeedbackButton.MouseButton1Click:Connect(function()
Also, when you send me the server script I noticed that you used :WaitForChild
inside of it, and :WaitForChild
isnāt necessary to use within server Scripts and can sometimes even cause issues in rare circumstances when doing so. The only situations where an Instance canāt exist on the server is if it was created locally, or hasnāt been created yet by another server Script, or thereās the possibility of it having been destroyed
Itās up to personal preference really, I used to do that (and I still sometimes do) but now I find myself somehow following Robloxās code style guide the more I continue to script
I never did so myself, so no unfortunately. Itās probably somewhere in your DevForum preferences though
Edit: @GamesVitaliy I checked and for your forum pic to match your current Roblox avatar youāll need to log out of the forum on all devices where youāre logged in, wait a small bit then log back in
I tried it, and itās working, I just reloginned in my devforum.