there are no errors in the output and I put the serverscript in ServerScriptService and the LocalScript in StarterPlayerScripts so it should work
please let me know what is wrong in the comments, thanks
I’ve adjusted the scripts to only include the relevant parts of the script
Server Script
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductHandler = ReplicatedStorage:WaitForChild("ProductHandler")
local Rooms = workspace.Rooms
local Floor1 = Rooms.Room0001
local playersTouched = {}
local function onTouchTrigger(hit, roomNumber)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
-- Check if the player exists and has not already touched the object
if player then
local hasDisplay = spawnPositions[tostring(roomNumber)]
if hasDisplay then
ProductHandler:FireClient(player, hasDisplay) -- idk if it sends this
print("has place to put display") -- prints this in the output properly
else
warn("No place to put display")
end
end
end
Client Script
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local MoveAdornee = ReplicatedStorage:WaitForChild("ProductHandler")
MoveAdornee.OnClientEvent:Connect(function(player)
print(player)
end)