Touched event not working on Roblox Client, But does in studio

  1. What do you want to achieve?
    For the flag to be anchored once the Detection part is touched in both Studio and Roblox Client

  2. What is the issue?
    For some reason, In studio testing, it always works fine. Then, when I try to do it in the actual Roblox Client it doesn’t work, at all, as if the Touched event doesn’t exist.

  3. What solutions have you tried so far?
    I can’t really find the cause because there are no errors / warnings in Console

script.Parent.Unequipped:Connect(function()
	local ServerStorageService = game:GetService("ServerStorage")
	
	local FlagTool = script.Parent
	local FlagModel = FlagTool.Flag
	local Player = FlagTool.Parent.Parent
	
	repeat
		task.wait()
	until FlagTool.Parent.Name == "Backpack"
	
	FlagModel.Parent = workspace
	FlagTool.Parent = ServerStorageService.DroppedFlags
	
	local offset = Vector3.new(0,8,5)
	
	FlagModel:MoveTo(Player.Character.Torso.Position + offset)
	
	for index, object in ipairs(FlagModel:GetDescendants()) do
		if object:IsA("BasePart") then
			object.Anchored = false
			object.CanCollide = false
		end
	end
	
	FlagModel.Detection.Touched:Connect(function(otherPart)
		for index, object in ipairs(FlagModel:GetDescendants()) do
			if object:IsA("BasePart") then
				object.Anchored = true
				object.CanCollide = false
			end
		end		
	end)
end)
1 Like

Still not solved. Can anyone help?

Can you please ensure that you have:

  1. Commited all scripts
  2. Actually published the game

Game is published, and, I am sure commiting scripts isn’t the issue. I don’t even get that menu where you commit them.