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

Where do I put a local script using live code?

Asked by 3 years ago
Edited by appxritixn 3 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

So, I'm currently trying to make a require module script that, when used in the dev console, would enable a user input service script, but the thing is, I clone it, and I don't know where to put it! I've tried the player character, I've tried the player, I've tried startercharacterscripts, I've tried starterplayerscripts, but nowhere it seemed to work. So where do I put the UserInputService script? (By the way, just incase this is wrong, it clones all the children in the module script + the module script, that might be the problem but I don't know (It puts all the children in the module script))

Script I'm Using:

local module = {}

function module.Owner(owner)
    local playerOwner = game:GetService("Players"):FindFirstChild(owner)
    local clone = script:Clone()
    clone.Parent = game.StarterPlayer.StarterPlayerScripts
    script:WaitForChild("FindModulePlayer"):Fire(playerOwner)
end

return module

0
Please encase your code in Lua tags (look for the Lua icon when editing or creating a question/answer). I did it for you this time. appxritixn 2235 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Module scripts don't run on their own. Here is a link to Module Scripts on the Roblox developer hub.

0
Yes, I know that, I'm requiring the script using the developer console. Howatcha 5 — 3y
Ad

Answer this question