Hi there!
I am in the middle of converting my game to StreamingEnabled. It appears that mobile has an issue with rendering something from ServerStorage that I'm trying to get. I changed my script from FindFirstChild to WaitForChild, with no avail.
The reason I know it's because of StreamingEnabled and potentially a "rendering" issue is because my script works fine in a blank baseplate with nothing there except for stuff in ServerStorage and streamingenabled turned on. In my super packed game, however, it does not work.
What is a reliable way of getting this to work? Would ReplicatedStorage be more reliable? Perhaps ReplicatedFirst, as this would cause these objects to render first into the workspace? Is there something I can change within my script? (I tried both ReplicatedStorage and ReplicatedFirst, neither of these work)
local ServerStorage = game:GetService("ServerStorage") game.ReplicatedStorage.keys.animal.OnServerEvent:Connect(function(plrWhoFiredEvent) local guy = plrWhoFiredEvent guy.TeamColor = BrickColor.new("1031") game.ServerStorage.powers:WaitForChild("AnimalConnection") local AnimalConnection = game.ServerStorage.powers.AnimalConnection:clone() AnimalConnection.Parent = guy.Backpack
I am also using MouseButton1Down in a GUI for this function. I know that not all functions are reliable for StreamingEnabled, I'm trying to get the hang of it. Maybe this is the problem?
Thanks!
I might not be able to answer you question but i think WaitForChild does receive nil after a set ammount of time. Try using
repeat wait(.3) until game.ServerStorage.powers:FindFirstChild("AnimalConnection")
if you want you can put in a print to see if it loops infinately or it will stop until you find the item.
repeat wait(.3) print('still waiting for the tool') until game.ServerStorage.powers:FindFirstChild("AnimalConnection")
print('tool has been found finally')
local AnimalConnection = game.ServerStorage.powers:FindFirstChild("AnimalConnection"):Clone()
Replicated first is what gets replicated FIRST to the client. This would be useful for custom loading GUIS. ServerStorage's contents only get replicated to the server, so clients cannot see it. Replicated Storage's contents is replicated to all clients AND the server.
Lets say what all would be used for. ServerStorage would be useful to keep someone's cash or stuff. ReplicatedStorage would be for all your remote events and stuff. ReplicatedFirst would be for loading screens and stuff.
Hope this helps!