Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Note GUI Open script opens once in actual game, perfectly fine in studio?

Asked by 6 years ago
Edited 6 years ago

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)

1
You can't use `LocalPlayer` in a ServerScript. theCJarmy7 1293 — 6y
0
I am sorry, that was a mistake, however it still does not work SooGloezNoob 45 — 6y
0
Didn't I already answer this question? Why did you post this again? T0XN 276 — 6y
View all comments (3 more)
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. T0XN 276 — 6y
0
It doesn't work TOXN SooGloezNoob 45 — 6y
0
NVM SooGloezNoob 45 — 6y

Answer this question