whenever in the game i execute the command it just says attempt to call a nil value (im making a store off a video https://www.youtube.com/watch?v=tbCHsxR1UWE&ab_channel 32:06)
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local remoteEvent = ReplicatedStorage:WaitForChild('BuyTool')
local function Buytool(player)
print(player.Name)
end
remoteEvent.OnServerEvent:Connect()

2 comments
Can you put it in a code block? You didn't put it properly.
done