If I were to put them into the StarterPack, they all work perfectly. Also note this game is in FE.
EDIT: I found out that the LocalScript in the tool runs, while the ServerScript in the tool doesn't!
Server Script:
print("hi") -- <-- THIS DOES NOT PRINT Tool = script.Parent CB = script.Parent.CreateBrick CB.OnServerEvent:connect(function(plr,cb,offset,target,mode,block,ts) print("hello world".. ts) end)
EDIT #2: The ServerScript works perfectly. There are no errors. The only problem is that it just isn't running! Disabled is false. I checked.
First make an script and put in ServerScriptService, you can name it whatever you want put the Tool in ServerStorage then try this:
serverStorage = game:GetService("ServerStorage")-- Gets ServerStorage while true do wait(5) Gamers = {}-- name of players(This is a table) for _, player in pairs(game.Players:GetPlayers()) do --get the players and makes sure they are alive if player and player.Character then local humanoid = player.Character:WaitForChild("Humanoid")--looks for humanoid if humanoid and humanoid.Health > 0 then -- checks that the health is over 0 table.insert(Gamers, player)-- inserts players into the table gamers end end end end backpack = game.Workspace.Players:FindFirstChild("Backpack")-- looks for backpack if backpack and Gamers then --if the player has a backpack and is a player then the tool will get clone into the backpack local tool = serverStorage:WaitForChild("Tool"):clone()--clones the tool so that we can always have it for a future use tool.Parent = backpack -- sets the tool parent to the backpack
I not sure if this works, maybe I just wasted my time writting this code. Just Started learning and im trying to help. Cheers!