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

Why doesn't the new bool value I instanced in a script not show up in ServerStorage?

Asked by 3 years ago
Edited 3 years ago

Here's the code from my script, it's parent is ServerScriptService:

local brick = game.Workspace.Part

brick.Touched:Connect(function(hit)
    if game.Players:GetPlayerFromCharacter(hit.Parent) then
        local truie = Instance.new("BoolValue")
        truie.Value = true
        truie.Parent = game.ServerStorage
        print(truie.Value)
        print(truie.Parent)
    else 
        local falsie = Instance.new("BoolValue")
        falsie.Value = false
        falsie.Parent= game.ServerStorage
        print(falsie.Value)
        print(falsie.Parent)
    end
end)

You can see that I put the New Instanced Value into Server Storage, but I don't see it in game explorer. I added the print function to test if the parent was Server Storage and it said Server Storage. But why does it not show up in game explorer?

1
Now this might be obvious. But when you test the game, are you testing as the client or the system? You can switch between the two in the "Test" tab in Studio. radiant_Light203 1166 — 3y
0
^ if you are in the client side you can't access server storage thecelestialcube 123 — 3y
0
On line 15, you can't print an object. It has to be a string. MarsSquirrel 10 — 3y
0
The printing isn't the problem. This question was solved by radiant light but it's a comment so I can't mark it as answered. raahatu 6 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

When your testing your game, you cannot see the contents of ServerStorage while in client mode. (Said By thecelestialcube)

HOW TO FIX: When playing the game, change to server mode and you SHOULD be able to see the contents.

Ad
Log in to vote
0
Answered by
MattVSNNL 620 Moderation Voter
3 years ago

You can't access the server storage through a client/ Local scripts

Answer this question