Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Expected ')' (to close '(' at line 5), got 'module' I'm new to scripting so what do I do?

local module = require(script.Parent:WaitForChild("ModuleScript"))
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

script.Parent.Activated:Connect(function module.Lift
 end)

I'm bad at scripting so can someone please help me.

5 comments

0

Can u please put it in a code block?!

0

Yes

0

fix the line 5 : script.Parent.Activated:Connect(function(module.Lift)

0

Hope it works

0

Expected ')' (to close '(' at column 42), got '.'

3 answers

local module = require(script.Parent:WaitForChild("ModuleScript")) local player = game.Players.LocalPlayer local mouse = player:GetMouse()

script.Parent.Activated:Connect(function(module.Lift)) end) Please accept this answer if it works

I suppose this is what you're trying to do

local module = require(script.Parent:WaitForChild("ModuleScript"))
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()
	module.Lift()
end)
local module = require(script.Parent:WaitForChild("ModuleScript"))
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

script.Parent.Activated:Connect(function()
	module.Lift()
 end)


Module.lift is not a valid function name so I think you're trying to make a function that runs:

module.Lift()

This discussion is preserved as it was. New answers, comments, and votes are closed.