Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

4 comments

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.

0

^ if you are in the client side you can't access server storage

0

On line 15, you can't print an object. It has to be a string.

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.

2 answers

✓ Accepted answer

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.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.