Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My chat triggered spells stopped working out of no where! What am I doing wrong?

I am making a game that uses the chat to trigger the spell you say, but out of nowhere it stopped working. I wasn't working on that section of the script or anything. I can't figure out what is wrong so here it is:

	player.Chatted:Connect(function(message)
		if player.Character:FindFirstChild("Wand") then
			local SpellSaid = string.upper(message)
			local SpellID = 0

			if SpellSaid == "ascendio" and Spells.ascendio.Value == true and player.stats.WandStatus.Value == false then
				SpellID = 4
				Sparkle.Color = ColorSequence.new(Color3.new(0, 255, 0),Color3.new(0, 255, 0))
				Sparkle.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, 0),NumberSequenceKeypoint.new(1, 0)}
			end
			if Spells.ascendio.Value == true then
				print("Spells.ascendio.Value == true")
			end
			if player.stats.WandStatus.Value == false then
				print("player.stats.WandStatus.Value == false")
			end
			if SpellSaid == "ascendio" then
				print("message == 'ascendio'")
			elseif wait() then
				print(SpellSaid)
			end

It prints Spells.ascendio.Value == true and player.stats.WandStatus.Value == false then it just prints "ascendio" not "message == 'ascendio'" What am i doing wrong pls help. I feel like I'm just being dumb and its right there in front of me lol

1 answer

You have used string.upper(message) and the script is checking for lowercase strings, shouldn't you make them search Uppercase words? Or just use string.lower instead.

6 comments

0

I did that, but now its printng

0

srry i didnt mean to press enter yet lol. Anyway now its printing a line of nothing then acendio under it.

0

Well that means the script is running right?

0

no because im checking for "ascendio" not " ascendio" , but im going to go try checking for " ascendio"

0

'-'

0

ugh now its printing ascendio by its self but i didnt check for that cause I changed it. like what? its like its teasing me or somthin lol

This discussion is preserved as it was. New answers, comments, and votes are closed.