01 | y = 1 |
02 | x = game.ServerStorage [ "Baton" ] :Clone(); |
03 | game:GetService( "UserInputService" ).InputBegan:connect( function (inputObject, gameProcessedEvent) |
04 | if inputObject.KeyCode = = Enum.KeyCode.E then |
05 | if y = = 1 then |
06 | game.Players.Player 1. Character.Humanoid:EquipTool(x); |
07 | y = 2 |
08 | elseif y = = 2 then |
09 | game.Players.Player 1. Character.Humanoid:UnequipTools(); |
10 | y = 1 |
11 | end |
12 | end |
13 | end ) |
14 | w = game.ServerStorage [ "BillyClubRiotShield" ] :Clone(); |
15 | game:GetService( "UserInputService" ).InputBegan:connect( function (inputObject, gameProcessedEvent) |
You are trying to access game.ServerStorage["Baton"]
from the client. Clients do not have access to ServerStorage online. If you intend to have clients accessing an object, store it in ReplicatedStorage so it can be accessed.