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

Module doesn't function as I want it to?

Asked by 4 years ago
Edited 4 years ago
local module = {}
function module.test(player)
    if player ~= nil then
    local player1 = game.Players:WaitForChild(player)       
    local mousescript = script.MOUSE
        mousescript.Module.Value = script
        mousescript.Parent = player.Character
        mousescript.Disabled = false
    end
end
return module

When I look in the explorer I see the localscript is gone but when I look in the character I dont see the localscript.

This is the following code I used for requiring the module. the script is located in workspace and is a server sided script.

wait(4)
require(workspace.ModuleScript).test("antoniorigo4")

what's its supposed to do: When it gets required it parents a localscript to the players character then enabling it and the localscript fires a remoteevent when the player presses the f key on their keyboard

Sorry if I cannot explain it properly.

0
Heres a tip for you just don't post the answer/comment if you don't know. antoniorigo4 117 — 4y
0
this is one weird ass script Lunaify 66 — 4y
0
Please stop this kind of behavior antoniorigo4 117 — 4y
1
You're not fully explaining what the script is suppose to do. We can't just make an inference on what you want to do. Not down-voting, but please add more detail and/or description. raid6n 2196 — 4y

Answer this question