Hello.
I have written a script involving a fireclient() function, and it is giving me an error.
Argument 1 missing or nil.
Here’s the script:
local proxprompt = game.Workspace.pppart.ProximityPrompt
local event = game.ReplicatedStorage:WaitForChild("levertocut1")
local lever = game.Workspace.Lever.LeverHandle
local lp = game.Workspace.Lever.LeverHandlepulled
local ts = game:GetService("TweenService")
local leversound = script.Parent.Parent.leversound
local tweeninfo = TweenInfo.new(
0.5,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local tweeninfo2 = TweenInfo.new(
1,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local tween = ts:Create(lever, tweeninfo, {CFrame = lp.CFrame})
local tween2 = ts:Create(game.Workspace.epart1, tweeninfo2, {CFrame = game.Workspace.epart1end.CFrame})
local tween3 = ts:Create(game.Workspace.epart2, tweeninfo2, {CFrame = game.Workspace.epart2end.CFrame})
proxprompt.Triggered:Connect(function()
leversound:Play()
proxprompt:Destroy()
event:FireClient()
wait(2)
tween:Play()
tween2:Play()
tween3:Play()
end)
If any of you scripting geniuses would take the time to help, I’d greatly appreciate it, as I’ve been looking for an answer for a while!