I’m having trouble figuring out ServerScriptService. From what I understand all scripts should be there if you don’t want them viewed (stolen). But I’m having trouble figuring out how to reference things like equipped tools. I am trying to make a server script located in ServerScriptService that when a certain part with a click detector is clicked it looks at what tool the player has equipped and depending on what tool it is makes another invisible part visible. I’m using a server script located in ServerScriptService to place the tools in the players backpack when they click them(clone from replicated service).
I understand (I think) that any tool the player has equipped becomes part of the character. Can I access the equipped tool with a server script located in ServerScriptService?
I thought I needed to define what Player and Character were but so far nothing has worked. I also tried something similar to this:
Players.PlayerAdded:Connect(playerAdded) for _, player in pairs(Players:GetPlayers()) do playerAdded(player)
If its not possible to check what item is equipped using a server script located in ServerScriptService is it possible to check what items are in the backpack? Thank you in advance for any help or ideas on what I should be doing.