Local scripting not running?

I know this is so obvious its going to be embarrassing once I figure it out, I have looked over this more times I can count, just can not see why it is not running, Checked all the syntax and any reason why it would be waiting, I tried to remove a :WaitForChild() and replace it with a wait(.1) at the top, still nothing…

Below is some pictures of the problem,

https://gyazo.com/e3a82117156c9714d02777eaf6a73c0a

https://gyazo.com/e99708bccabf3df348f9a4d618cc07c0

– Code

-- Made by 12904(Builder/Scripter)
wait(.1)
local Q1 = "Why do you think you deserve this position(Please supply 3+ sentences)"
local Q2 = "Which position are you applying for?"
local Q3 = "Do you have any experience in this position in a different discord?"

local Event = game.ReplicatedStorage.Event
print("Loaded")
script.Parent.MouseButton1Down:Connect(function()
	print("FiredClient")
	local answers = ("			"..game.Players.LocalPlayer.Name.." has summited this application. His account age is ".. game.Players.LocalPlayer.AccountAge..".  \
		\
		"..Q1.." : ".. script.Parent.Parent.Question1.Text..",\
		\
		"..Q2.." : ".. script.Parent.Parent.Question2.Text..",\
		\
		"..Q3.." : ".. script.Parent.Parent.Question3.Text)
	Event:FireServer(answers)
end)

This works in studio but not in-game. The output shows no errors and it is not printing anything…

Any ideas?

3 Likes

So do you a Remote Event/Remote Function in Replicated Storage?

1 Like

Yes, there is a remote event inside of Replicated Storage named “Event”

https://gyazo.com/0a0246c30e5522b7467f9105c949af2e

1 Like


What happens here?

1 Like

It is taken to a server script to be processed and sent through a proxy to a discord webhook.

Event.OnServerEvent:Connect(function(plr, message)
	print("Fired")
	send("Application Bot", message, plr)
	print(message)
	for i,v in pairs(game.Players:GetPlayers()) do
		v:Kick("Thank you for summiting a application, your application will be read immedately.")
	end
end)

So when you click a button your game presents the user with a question and they can then type in an answer?

Not quite, your screen has 3 questions, then you just fill them in then press submit. Once you click submit, it will take answers, format it then send it to the server to be sent to discord.

https://gyazo.com/a794b25c2ecb99bcdc281d421b24095a

Mkay I’ve never done anything like that but have a go at utilising the script analysis tool.
I’ve just tried it and it showed 37 warnings on scripts that worked fine, none of these warnings were shown in output previously.

Just tried, it shows 0 warnings

What do you mean by this, the answers aren’t uploading?

Nothing is happening, it aint even printing anything

Do you mind posting the game link so I can have a test of it?


Is this a text label or text button? (silly question sorry)

Text button, checked it about 5 times, lol

Can you check to see if it’s “selectable”?

It is check to true, https://gyazo.com/56db5f2dd2ac30fe54c767e57b049cdd

I am honestly stumped by this, I think the problem is coming from the

For some reason I can’t select it when I was in game. I wish I could help but this is beyond me.

Have you tried adding a :WaitForChild() on the event in replicated storage?

EDIT: What specifically is wrong? Is it not printing ‘Loaded’?

(I’m not 12904) If you go into the game, and open the Dev Console, it doesn’t appear to print “Loaded”.