Module Script
local InputImageLibrary = require(408470686)
return InputImageLibrary
Local Script
local inputImageLibraryModule = require(game.ServerScriptService.InputImageLibraryModule)
local player = game.Players.LocalPlayer
local mainFrame = script.Parent
local playButton = mainFrame:WaitForChild("PlayButton")
playButton.MouseButton1Down:connect(function()
playButton:TweenPosition(UDim2.new(0.5, -150, 1, 0), "Out", "Quad", 1, true)
end)
if game:GetService("UserInputService").GamepadEnabled then
local X_Button = inputImageLibraryModule:GetImageLabel("ButtonX", "Dark")
X_Button.Parent = playButton
X_Button.Size = UDim2.new(0, 100, 0, 100)
X_Button.Position = UDim2.new(0.5, -50, 1, 30)
game:GetService("UserInputService").InputChanged:connect(function(input, processed)
if input.UserInputType == Enum.UserInputType.Gamepad1 then
if input.KeyCode == Enum.KeyCode.ButtonX then
playButton:TweenPosition(UDim2.new(0.5, -150, 1, 0), "Out", "Quad", 1, true)
X_Button:Destroy()
end
end
end)
end
21:22:17.867 - require(assetId) cannot be called from a client 21:22:17.868 - Script 'ReplicatedStorage.InputImageLibraryModule', Line 1 21:22:17.869 - Stack End 21:22:17.870 - Requested module experienced an error while loading 21:22:17.871 - Script 'Players.Player1.PlayerGui.HUD.MainFrame.MainLocalScript', Line 1 21:22:17.873 - Stack End
I am trying to use the image library to get images for the xbox players. I used to wiki, but the wiki doesn't say what script to put this in. All it had was to put require in a module script, but where does the module script go and does my code in the local script stay in a local script? Would be great if someone could please explain to me how it should works. You can't use require() in a local script. All I really want is for it to get the image library, so I can just add images to my game.

4 comments
line 1 inputImageLibraryModule, line 13 InputImageLibrary see the problem?
Editted my script. Still not working
local scripts do not have access to ServerScriptService put it in the rep storage
Editted now with output. I put the modulescript in repstorage as well