1 | local module = require(script.Parent:WaitForChild( "ModuleScript" )) |
2 | local player = game.Players.LocalPlayer |
3 | local mouse = player:GetMouse() |
4 |
5 | script.Parent.Activated:Connect( function module.Lift |
6 | end ) |
I'm bad at scripting so can someone please help me.
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
1 | local module = require(script.Parent:WaitForChild( "ModuleScript" )) |
2 | local player = game.Players.LocalPlayer |
3 | local mouse = player:GetMouse() |
4 |
5 | script.Parent.Activated:Connect( function () |
6 | module.Lift() |
7 | end ) |
1 | local module = require(script.Parent:WaitForChild( "ModuleScript" )) |
2 | local player = game.Players.LocalPlayer |
3 | local mouse = player:GetMouse() |
4 |
5 | script.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:
1 | module.Lift() |