I'm trying to put Path Givers in my game, and whilst they work fine they are only visible to the player who is creating the Paths. I googled a fix to this and I say someone say on the DevForums that I could pass the Tool's LocalScript through a Server Script by using 'tool:activated:connect()'
Since I'm fairly new to coding I'm not entirely sure how I can do this, can anybody help me understand what I need to do?
You should use Remote Events to connect a Server script to Local script and vice versa.
I'll make a little example of how to use it with a tool:
--local script: local text = 'WOW!' local event = game:GetService('ReplicatedStorage').RemoteEvent local tool = script.Parent tool.Activated:Connect(function() event:FireServer(text) end) --server script: local event = game:GetService('ReplicatedStorage').RemoteEvent event.OnServerEvent:Connect(function(plr, text) print(text) end)