the part inside model the inside folder that go to workspace sometimes.
local RS = game:GetService("ReplicatedStorage")
local Plrs = game:GetService("Players")
local RE = RS:WaitForChild("FirstQuest")
local Plr = Plrs.LocalPlayer
local Pat = workspace:WaitForChild("HalloweenDropper").StuffAtHalloweenLobby.HalloweenDropperDone
Pat.Touched:Connect(function(Hit)
local Target = Hit.Parent
local TouchedPlr = Plrs:GetPlayerFromCharacter(Target)
if TouchedPlr and TouchedPlr == Plr then
RE:FireServer() -- This will send a request from the client to the server
end
end)
RS = game:GetService("ReplicatedStorage")
Players = game:GetService("Players")
RE = RS:FindFirstChild("FirstQuest")
Pat = workspace:FindFirstChild("HalloweenDropper").StuffAtHalloweenLobby.HalloweenDropperDone
Pat.Touched:Connect(function(hit)
local Target = hit.Parent:FindFirstChild("Humanoid") -- Should Detect the Player
if Target then
RE:FireServer() -- Assuming you have the Player Variable in the RemoteEvent, should run on the Player
end
end)
If it says Attempt to index nil with "Variable"
It might mean that the specific Instance doesnt exist for the script cant find it.