Hello, I'm trying to make a system where, when you touch these parts, then it fires a remote event to the client and tweens the Gui on the screen. But, I'm getting an unknown 'Connect' error when the game starts, and before I got that error, whenever I tried to step on the parts, it didn't tween.
-- Server Script:
local BadBoyEvent = game:GetService("ReplicatedStorage").RemoteEvents:WaitForChild("NPCRemotes"):FindFirstChild("BadBoyGUIFire")
local PartsStepped = workspace.Lobby:WaitForChild("TalkToNPC"):GetChildren()
local BadBoyDB = false
PartsStepped.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not BadBoyDB and hum and plr then
BadBoyDB = true
BadBoyEvent:FireClient(plr)
wait(2)
BadBoyDB = false
end
end)
-- Local Script:
local BadFrame = script.Parent:FindFirstChild("BadBoyFrame")
local BadBoyEvent = game:GetService("ReplicatedStorage").RemoteEvents:WaitForChild("NPCRemotes"):FindFirstChild("BadBoyGUIFire")
local function TweenBadFrame(plr)
BadFrame:TweenPosition(
UDim2.new(0.044, 0,0.678, 0),
"Back",
"In",
1,
false,
nil
)
print("The Bad Tween Frame was a Success!")
end
BadBoyEvent.OnClientEvent:Connect(TweenBadFrame)
Error: ServerScriptService.NPCTalkGUI:5: attempt to index nil with 'Connect' - Server - NPCTalkGUI:5
If you find a solution, please comment below!

2 comments
I think this is the solution, would you try going into settings and turning on HTTP services and the datastore services.
I already had that on but thanks for commenting!