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

Why will this script work in Studio test but not in-game? (Text Boxes)

Asked by
Trew86 175
5 years ago
Edited 5 years ago

Hey everyone, here is the script that I can get to work in Play Solo test mode but not in the game.

local Seat = script.Parent.Parent

local Controls = Seat.Parent

local Model = Controls.Parent:GetChildren()

local Gui = Seat.Guis.TextGui


Gui.Frame.TextBox.Changed:connect(function(prop)

    if prop == "Text" then

        for i, v in pairs(Model) do

            if v.Name == "CenterCar" or v.Name == "RearCar" then

                v.TxtVal.Value = (Gui.Frame.TextBox.Text)

            end

        end

    end

end)

The part of the script that's giving me the issue is the last paragraph. In-game, when the textbox changes, the v.TxtVal.Value won't change. It works in studio, though. I have a feeling it has to do with filtering, but I'm not sure. Can anyone think of a fix?

0
Is it a Local Script or a Server Script? If it is a Server Script try changing it to a Local Script. tawk1215 47 — 5y
0
Also here's a tip don't use the play button in studio instad use the local server to test. MCrafter49 8 — 5y
0
we would need to know where the script is placed and what kind of script it is to help you yellp1 193 — 5y
0
Okay guys. I took tawk1215's advice and used a local script. It helped me get halfway there. It got the values to be set to the right text, but now I can't get the changed event to fire in server test when that value is changed by this script. I posted the issue in a different thread. Trew86 175 — 5y

Answer this question