I just need to know why this script for a building tool isn't working in Roblox.

-- Server Script
local tool = script.Parent
local clickEvent = tool.ClickEvent
local clickEventConnection

local Player = script.Parent.Parent.Parent




local Storage = game.Workspace.PartStorage
local function createPart(location)
	local part = Instance.new('Part', Storage)
	part.Name = "Brick"
	part.Anchored = true
	part.Size = Vector3.new(2,1,2)		-- X, Y, Z
	part.CFrame = location
	
end
 
local function onClick(player, clickLocation)
	createPart(clickLocation)
end
 
local function onEquip()
	clickEventConnection = clickEvent.OnServerEvent:connect(onClick)
end
 
local function onUnequip()
	clickEventConnection:disconnect()
end
 
tool.Equipped:connect(onEquip)
tool.Unequipped:connect(onUnequip)

This works in Roblox studio, but not in Roblox itself. In roblox itself, the tools don't load.

Output:

Replication: Can't create default object type of players DataModel.htmlPost should be HttpPost

In roblox Studio output:

21:56:44.385 - Auto-Saving... 21:56:45.100 - Character is not a valid member of Plugin --This is a plugin I have 21:56:45.101 - Script 'Plugin_144711773.ArmorMakerRemake.Script.BodyArmorAdmin', Line 16 21:56:45.102 - Stack End 21:56:45.103 - Character is not a valid member of Plugin 21:56:45.104 - Script 'Plugin_144711773.ArmorMakerRemake.Script.BodyArmor', Line 17 21:56:45.105 - Stack End

This tool is in the Starter Pack folder, but everything in the starter pack folder never gets in your inventory.

2 comments

0

Click the lua button in the top right and put the code in it

0

sorry, I'm new here and someone just told me to come here for help