Script not working [I still need help]

The issue is with your if statment. You should being smthing like:

if textbox.Text == “rapture” then

You should not/don’t need the :find part when checking.

if I don’t if somebody doesn’t exactly do rapture it wont work, i want it to work even if somebody does something like this “a rapture”

It still doesn’t work helppppppp

Please i need help, I’ve been trying to figure it out for so long

I think I’ve fixed it.
script.Parent.Changed:Connect(function(plr) if script.Parent.ContentText:match("rapture") == "rapture" then print("yes2") end end)
It prints yes2 whenever they find the word rapture, so if someone types ‘a rapture’ or ‘the quiet rapture’ it will print.

yes but I want it to trigger as a keyword, so even if person adds other letters it will still work

Yes, that is what I said. I tested it out so if I put ‘a rapture’ it will still work.

image

You forgot to add the if. I put it in but the format got weird when I did this.

Here’s the video of it working (I put the text as raptor instead of rapture tho):

I type ‘a raptor’ and it prints, it also puts the text there like your original script would.

I will try this and see if it works


I do not think those errors have any relation with the script. What is your script named?

localscript -------------------

Can you send a screenshot of where it is located?

image

Can you send me a screenshot of what’s inside your script again? Only one error belonged to the local script and I think that was maybe a typo or something.

local plr = game.Players.LocalPlayer
--


	
local textbox = script.Parent
textbox:GetPropertyChangedSignal("Text"):Connect(function()
	

		print("work")
		task.wait(0.7)
		if textbox.Text ==  textbox.Text:find("fuck") or textbox.Text:find("Fuck") or textbox.Text:find("shit") or textbox.Text:find("Shit") then
			plr:Kick("No Swear Words.")
		end

   if script.Parent.ContentText:match("rapture") == "rapture" then
			print("yes2")
		
				task.wait()
				terminalscreen.SurfaceGui:FindFirstChild("Output").Text = [[(c.o.i informational terminal)
this is a local database. be sure to update before each descent. last updated today [5/3781]
[entry]
the quiet rapture
[body]
in 357 eic, without any prior warning, radio contact with our respective planets was suddenly cut. nobody can recall having visual contact with any planets when the incident occurred, or experiencing any other unusual phenomena, so it's uncertain what exactly might have happened. upon investigation, it was observed independently by several stations that where there had previously been planets, nothing remained. further investigation over the following months revealed that all known planets with sentient life, floura and fauna, a habitable atmosphere, or any sort of natural resources were likewise gone, along with all known stars. the only celestial bodies that have been found since are either uninhabitable moons or asteroids.

many theories have been proposed for this disaster, including religious interpretations of it as a literal rapture, some unknown quantum anomaly, or something more cosmic and sinister. no concrete answers yet. there are no concrete answers]]
			
		end)
		if textbox.Text == textbox.Text:find("mars") then

		end
		if textbox.Text == textbox.Text:find("iron lung") or textbox.Text:find("sm13") then

		end
		if textbox.Text == textbox.Text:find("interstellar martian calander") or textbox.Text:find("imc") then

		end
		
end)
1 Like

try this it should work fine now, the problem was in your if statement

image
it should be
image
that’s it

and about the terminalscreen i dont know what dose it do so i commented it

local plr = game.Players.LocalPlayer


local textbox = script.Parent
textbox:GetPropertyChangedSignal("Text"):Connect(function()


	print("work")
	
	task.wait(0.7)
	
	if textbox.Text == "test" or textbox.Text == "F###" or textbox.Text == "s###" or textbox.Text == "S###" then --// you can change back theses strings
		plr:Kick("No Swear Words.")
	end

	if textbox.Text == "rapture" or textbox.Text == "the quiet rapture"  then
		print("yes2")

		task.wait()
		--terminalscreen.SurfaceGui:FindFirstChild("Output").Text = [[(c.o.i informational terminal)
		--this is a local database. be sure to update before each descent. last updated today [5/3781]
		--[entry]
		--the quiet rapture
		--[body]
		--in 357 eic, without any prior warning, radio contact with our respective planets was suddenly cut. nobody can recall having visual contact with any planets when the incident occurred, or experiencing any other unusual phenomena, so it's uncertain what exactly might have happened. upon investigation, it was observed independently by several stations that where there had previously been planets, nothing remained. further investigation over the following months revealed that all known planets with sentient life, floura and fauna, a habitable atmosphere, or any sort of natural resources were likewise gone, along with all known stars. the only celestial bodies that have been found since are either uninhabitable moons or asteroids.

		--many theories have been proposed for this disaster, including religious interpretations of it as a literal rapture, some unknown quantum anomaly, or something more cosmic and sinister. no concrete answers yet. there are no concrete answers]]

	end
	if textbox.Text == "mars" then

	end
	if textbox.Text == "iron lung" or textbox.Text == "sm13" then

	end
	if textbox.Text == "interstellar martian calander" or textbox.Text == "imc" then

	end
end)

that works but doesn’t support keywords

1 Like