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

scripts breaking when not using solo?

Asked by 10 years ago

so im experiencing a problem such that my scripts work perfectly fine while i test it in solo mode but as soon as i start server and play it most of the scripts do now work(some do though) this also occurs when my random people play the game do you know what the problem is?

Additional Info: Using local scripts Player can for some reason edit my textbox

local last = nil
local function turnOrange(new)
    if last ~= nil then
        if new.Name ~= last.Name then
            new.TextColor3 = Color3.new(227, 125, 0)
            last.TextColor3 = Color3.new(235, 235, 235)
        end
    else new.TextColor3 = Color3.new(235, 235, 235)
    end
    last = new
end 

for i, v in pairs(script.Parent.Parent:GetChildren()) do
    if v:IsA("TextButton") and v.Name ~= "Select" then
        v.MouseButton1Click:connect(function()
            turnOrange(v) 
        end)
    end
end



local last = nil
local function changeTransparency(new)
    if last ~= nil then
        if last.Name ~= new.Name then
            new.BackgroundTransparency = 0.5
            last.BackgroundTransparency = 1
        end
    else new.BackgroundTransparency = 1
    end
    last = new
end
for i, v in pairs(script.Parent.Parent:GetChildren()) do
    if v:IsA("TextButton") and v.Name ~= "Select" then
        v.MouseEnter:connect(function()
            changeTransparency(v)
        end)
    end
end

2 answers

Log in to vote
0
Answered by 10 years ago

Well I do know that when you are in Studio>Test>PlaySolo all scripts will be ran as LocalScripts. Because of this you may have some scripts that you need to switch to a LocalScript that are currently just Scripts causing them to not work In-Game. I had that problem before.

0
Didn't Wall142 say the same thing I said? PropheticExtinction 75 — 10y
Ad
Log in to vote
0
Answered by
TofuBytes 500 Moderation Voter
10 years ago

Well, for your scripting problems, you may be using the wrong scripts for the wrong purposes they were made for. Here's some info on how you can fix those problems:

When should you use a LocalScript and when should you use a Script?

As for the TextBox, make sure you're using a TextLabel. Users can't edit them and you can only modify the text using script events.

Hopefully this helps you! :)

0
i edited and gave an example of my script not working namelessassasin 30 — 10y
0
its supposed to make the textbutton background transparency change works fine in solo but doesnt work when not in solo namelessassasin 30 — 10y

Answer this question