I am trying to make a tool which, when equipped, creates a localpart (one only seen by the local player) and I am kind of stuck.
sp=script.Parent
equipped=false
function onEquipped(mouse)
equipped=true
local player = game.Players.LocalPlayer
local character = player.Character
local bin = Instance.new("Message")
bin.Name = 'LocalBin'
bin.Parent = character
local platform = Instance.new("Part")
platform.CFrame = character.Torso.CFrame * CFrame.new(0, -3, 0)
platform.Anchored = true
platform.Size = Vector3.new(10, 1.2, 10)
platform.Parent = bin
end
function onUnequipped()
equipped=false
game.Players.LocalPlayer.Character.LocalBin:remove()
end
sp.Equipped:connect(onEquipped)
sp.Unequipped:connect(onUnequipped)
Thanks in advance!

3 comments
Thanks for the reply, unfortunately, this didn't work.
Are you sure?
I can't see any errors with the bits I added in.