when im clone the block to torch but the script in their is not working but if i use local scirpt the touched will not work

local button = script.Parent
local Player = game.Players.LocalPlayer
local debounce = false
local Point = game.ReplicatedStorage.DeliveryPoint.DeliveryPoint
local remote = game.ReplicatedStorage.TorchDeliveryPart

button.MouseButton1Down:Connect(function(plr)
	if not debounce then
		debounce = true
		local DSuccess = Instance.new("IntValue")
		DSuccess.Parent = Player
		DSuccess.Name = "DeliverySuccess"
		local Box = game.ReplicatedStorage.DeliveryThing.Box:Clone()
		Box.Parent = Player.Backpack
		DSuccess.Value = 1
		Point:Clone()
		Point.Parent = workspace
		Point.Position = Vector3.new(-126.3, 0.5, -3)
		wait(2)
		debounce = false
	end
end)

remote.OnClientEvent:Connect(function()
	local Box = Player.Backpack
	local Part = game.Workspace:WaitForChild("DeliveryPoint")
end)

other

local part = script.Parent
local remote = game.ReplicatedStorage.TorchDeliveryPart

part.Touched:Connect(function(hit)
	if game.Players:GetPlayerFromCharacter(hit.Parent) then
		remote:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
	end
	wait(1)
end)

1 comment

0

why everyone say nothing