Basic script not working

I’m trying to make a small presentation system for an army however the script is not working. The script is located below.

image

local Label = script.Parent

local Rules = Label.Frame.Rules

local Ranks = Label.Frame.Ranks

local Face = Label.Frame.Faces

local function FacesButtonPressed()

Label.Text = "Faces at the Indian Army"

wait(3)

Label.Text = "All faces called out by your host or said person are to be in the format of (Direction), face. Any commands out of that exact format and grammar are to be ignored as they are invalid."

wait(8)

Label.Text = "'Left, face.' - Turn 90 degrees to the left from your current position."

wait(5)

Label.Text = "'Right, face.' - Turn 90 degrees to the right from your current position."

wait(5)

Label.Text = "'About, face.' - Turn 180 degrees to the right from your current position."

wait(6)

Label.Text = "'Centre, face.' - Return to the original position you first came in. "

wait(5)

Label.Text = "'Control, face.' - Face your host or the person who called that command until the command 'Center, face.' is called."

wait(5)

Label.Text = "All faces are done from the position you are facing."

wait(3)

Label.Text = "Example: If you are facing to the left and a 'Right, face.'' is called then you would turn to the front as that would be a right turn."

wait(6)

Label.Text = "If you have any questions, please do not hesitate to ask for PTS."

wait(3)

end

local function RulesButtonPressed()

Label.Text = "Rules and Standards of the Indian Army"

wait(3)

Label.Text = "All personnel who are within the Army are to follow the dress code of the Indian Army."

wait(5)

Label.Text = "These include: Realistic skin tones, no accessories, correct uniform in relation with your rank. Wearing an incorrect rank's uniform counts as stolen valor and will result in a punishment."

wait(5)

Label.Text = "Next, you are to treat your comrades with respect. You should call any Enlisted by their rank and any officers are to be referred to as 'Sir' or Ma'am' when you are talking to them."

wait(6)

Label.Text = "Any form or act of harassment and bullying amongst other individuals will be dealt with promptly and will NOT be tolerated."

wait(5)

Label.Text = "Abuse of your title, privileges or tools will result in demotion, or removal from your division depending on the severity."

wait(5)

Label.Text = "If you have any questions, please don't hesitate to ask for PTS."

wait(3)

end

local function RanksButtonPressed()

Label.Text = "Ranks of the Indian Army"

wait(2)

Label.Text = "Recruit"

wait(1)

Label.Text = "Sepoy"

wait(1)

Label.Text = "Lance Naik"

wait(1)

Label.Text = "Naik"

wait(1)

Label.Text = "Naib Subedar"

wait(1)

Label.Text = "Subedar"

wait(1)

Label.Text = "Lieutenant"

wait(1)

Label.Text = "Captain"

wait(1)

Label.Text = "Major"

wait(1)

Label.Text = "Lieutenant Colonel"

wait(1)

Label.Text = "Colonel"

wait(1)

Label.Text = "Brigadier"

wait(1)

Label.Text = "Major General"

wait(1)

Label.Text = "Lieutenant General"

wait(1)

end

Rules.Activated:Connect(RulesButtonPressed)

Ranks.Activated:Connect(RanksButtonPressed)

Face.Activated:Connect(FacesButtonPressed)

If indeed the buttons Parented to Frame are buttons then i suggest using
Rules.MouseButton1Click:Connect(RulesButtonPressed)
So on and so forth
If these are buttons, then the problem might be that the functions never activate with Activated when clicked

1 Like

cant you please use a while loop instead

Does MouseButton1Click work for mobile users? If not is there a way to do it so it’s friendly for them?

I believe MouseButton1Click is compatible with mobile since i assume that a “Tap” on a screen registers as a Left Click

1 Like

I will try do this and see if it works.

Another issue with this script, that i have just noticed, it probably should be a LocalScript rather then a ServerScript since im pretty sure the server doesnt know if the button was clicked.

This worked. Thank you for the help.