This script works fine in studio but when I test it out, it only opens once and when you try to open it again, it doesn't work. (SCRIPT IS A NORMAL SCRIPT INSIDE OF A PART WITH CLICK DETECTOR)

text_wrapped = true
--If true, sentences will auto-move to the next line.

--Double square brackets lets tabs and new lines work easily.
text = 
[[
I an't suppose to see anything that goes in between this gate and the walls of that old aslyum. However, some word did spill out of the creaks of the walls stating that what they do in there is illegal. Not my problem. I am just the gate keeper.
]]


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


script.Parent.ClickDetector.MouseHoverEnter:Connect(function(Clicker) 
		if script.Parent:FindFirstChild("SelectionBox") then
			print("googoo")
		else
	
local selection = Instance.new("SelectionBox")
	selection.Color3 = Color3.new(153, 153, 153)
	selection.Parent = Clicker.PlayerGui
	selection.Adornee = script.Parent
	end
end)

script.Parent.ClickDetector.MouseHoverLeave:Connect(function(Clicker)
	if Clicker.PlayerGui:FindFirstChild("SelectionBox") then
		Clicker.PlayerGui.SelectionBox:Destroy()
	end
end)

b = script.Parent
scroll_note = b:WaitForChild'scroll_note'
b.ClickDetector.MouseClick:Connect(function(Clicker)
		if Clicker then
			if not Clicker.PlayerGui:FindFirstChild("scroll_note") then
				local g = scroll_note:Clone()
				g.cutoff.Frame.scroll.TextLabel.TextWrapped = true
				g.cutoff.Frame.scroll.TextLabel.Text = text
				g.Parent = Clicker.PlayerGui
				end
	end
end)

7 comments

1

You can't use LocalPlayer in a ServerScript.

0

I am sorry, that was a mistake, however it still does not work

0

Didn't I already answer this question? Why did you post this again?

0

If you're not going to use FE, then ensure that FE is turned off in the properties of workspace. If it is on and you aren't using FE functions then nearly all your code will break.

0

It doesn't work TOXN

0

NVM