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

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

Asked by
1x_pa 0
4 years ago
Edited 4 years ago
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.

0
Can u please put it in a code block?! Aiden_12114 79 — 4y
0
Yes 1x_pa 0 — 4y
0
fix the line 5 : script.Parent.Activated:Connect(function(module.Lift) Nguyenlegiahung 1091 — 4y
0
Hope it works Nguyenlegiahung 1091 — 4y
0
Expected ')' (to close '(' at column 42), got '.' 1x_pa 0 — 4y

3 answers

Log in to vote
0
Answered by
zomspi 541 Moderation Voter
4 years ago

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

Ad
Log in to vote
0
Answered by 4 years ago

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)
Log in to vote
0
Answered by 4 years ago
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()

Answer this question