Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My ModuleScript require script is not working and I don't know why?

Asked by 2 years ago

Hi, I am trying to connectmy modulescript (in RepStorage) to a localscript (in StaterGui), but every time I try it it says "error while loading requested module"


local ReplicatedStorage = game:GetService("ReplicatedStorage") local SoloQueueModule = require(ReplicatedStorage:WaitForChild("SoloQueue")) script.Parent.Parent.Back.MouseButton1Click:Connect(function() script.Parent.Parent.Parent.Parent.SoloQueue.Enabled = false script.Parent.Parent.Parent.Parent.Start.Enabled = true SoloQueueModule.remove() -- remove function end)
1
It should provide more than just 'error while loading requested module', see if there are any more errors loowa_yawn 383 — 2y
0
Mate, I don't think you can require a module in a client script. (I think) AProgrammR 398 — 2y

Answer this question