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

How can I make this script function ingame without use of RemoteEvents?

Asked by 7 years ago
Edited 7 years ago

Hello, This script is just supposed to highlight text when it's selected from a gui. It also puts the text under a string value for other use e.g. a colouring script. Unfortunately with Filtering Enabled this script only works in test mode. It's in a server script, it's parent is the textbox that is selected.

I've been told multiple times not to use RemoteEvents for this, so if there is any visible problem then please let me know.

local Target = game.ReplicatedStorage.Target
script.Parent.MouseButton1Down:Connect(function()
    if script.Parent.TextStrokeTransparency == 1 then
        script.Parent.TextStrokeTransparency = 0
            Target.Value = script.Parent.Name
    elseif script.Parent.TextStrokeTransparency == 0 then
        script.Parent.TextStrokeTransparency = 1
        Target.Value = ""
    end


end)
    Target.Changed:connect(function()
        if  Target.Value~= script.Parent.Name then
            script.Parent.TextStrokeTransparency = 1
        end
    end)
0
Maybe try using a String Value instead of a Remote Event RoyallyFlushed 19 — 7y
0
I'm using a string value, that's what 'Target' is Samstergizmo 28 — 7y

Answer this question