How to transfer data between scripts on a non replicated way

hi so im trying to make lucky drops that spawn orbs when touched and everything is going good except until the orb dropping part. the script needs to be a local script so the module can run the script so i put a vector 3 value inside the part and when the lucky block was made (the position is random every time its made) it would save the position onto the block. the thing is its not replicated so the local script can see it. i can use events but it cant transfer any data, my question is how do i only save the numbers instead of doing Vector3.Value?

local rp = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
script.Parent.Touched:Connect(function(hit)
	local playermodel = hit.Parent
	print("work")
	local player = game:GetService("Players"):FindFirstChild(playermodel.Name)
	local block = script.Parent.ValuePos.Value
	
	if player then
		rp.Events.Misc.LuckyBlock.Client:FireClient(block)
	end
end)

here is my script

You can send data along with the remote, in the form of variables.
rp.Events.Misc.LuckyBlock.Client:FireClient(player, pos.X, pos.Y, pos.Z)

local rp = game:GetService("ReplicatedStorage")
local event = rp:WaitForChild("Events"):WaitForChild("Misc")
	:WaitForChild("LuckyBlock"):WaitForChild("Client")

event.OnClientEvent:Connect(function(x, y, z)
	local position = Vector3.new(x, y, z)
	print(position)
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.