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
5 years ago
Edited 5 years ago
1local module = require(script.Parent:WaitForChild("ModuleScript"))
2local player = game.Players.LocalPlayer
3local mouse = player:GetMouse()
4 
5script.Parent.Activated:Connect(function module.Lift
6 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 — 5y
0
Yes 1x_pa 0 — 5y
0
fix the line 5 : script.Parent.Activated:Connect(function(module.Lift) Nguyenlegiahung 1091 — 5y
0
Hope it works Nguyenlegiahung 1091 — 5y
0
Expected ')' (to close '(' at column 42), got '.' 1x_pa 0 — 5y

3 answers

Log in to vote
0
Answered by
zomspi 541 Moderation Voter
5 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 5 years ago

I suppose this is what you're trying to do

1local module = require(script.Parent:WaitForChild("ModuleScript"))
2local player = game.Players.LocalPlayer
3local mouse = player:GetMouse()
4 
5script.Parent.Activated:Connect(function()
6    module.Lift()
7end)
Log in to vote
0
Answered by 5 years ago
1local module = require(script.Parent:WaitForChild("ModuleScript"))
2local player = game.Players.LocalPlayer
3local mouse = player:GetMouse()
4 
5script.Parent.Activated:Connect(function()
6    module.Lift()
7 end)

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

1module.Lift()

Answer this question