the script below for a loadout doesn't work in servers/studio test severs, it usually works in studio
local Weapon = "" local Storage = game.ServerStorage Storage:WaitForChild("Odachi") Storage:WaitForChild("Katana") function Odachi() Weapon = "Odachi" end function Katana() Weapon = "Katana" end function Deploy() if Weapon ~= "" then local Clone = Storage[Weapon]:Clone() Clone.Parent = script.Parent.Parent.Parent.Parent.Backpack game.Players.LocalPlayer.PlayerScripts:WaitForChild("CameraScript"):Destroy() game.ServerStorage:WaitForChild("CameraScript"):Clone().Parent = game.Players.LocalPlayer.PlayerScripts game.Players.LocalPlayer.PlayerScripts.CameraScript.Disabled = false script.Parent.Parent:Destroy() end return end script.Parent.Odachi.MouseButton1Click:connect(Odachi) script.Parent.Katana.MouseButton1Click:connect(Katana) script.Parent.Deploy.MouseButton1Click:connect(Deploy)
Your problem is that it is a local script. You can't necessarily access game.ServerStorage with a local script. The reason it works in studio is because in studio, when you click the play button, everything is ran locally. So ServerStorage does work on the client, but in an actual server it doesnt.
A simple fix would be to use ReplicatedStorage instead of ServerStorage.
Hope I helped!