Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

annoying bug with parts? [solved]

player = game.Players.LocalPlayer
mouse = player:GetMouse()
--clicky = game.Workspace.placey
tool = script.Parent


local function onEquip()
brick = Instance.new("Part",game.Workspace)
brick.BrickColor = BrickColor.new("Really red")
brick.Name = "movin"
brick.Size = Vector3.new(3,0,3)
brick.Transparency = .6
brick.CanCollide = false
brick.BottomSurface = "Smooth"
brick.TopSurface = "Smooth"
brick.Shape = "Block"
brick.Anchored = true
mouse.TargetFilter = brick
mouse.Move:connect(function()
if mouse then
brick.CFrame = CFrame.new(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z)
--brick.Rotation = Vector3.new(0,0,-90)
end
end)
end


tool.Equipped:connect(onEquip)

tool.Unequipped:connect(function()
brick:Destroy()
end)

whenever i select a tool, it makes a part, and has all the properties i want working correctly. the part follows my mouse. the only problem is that the player flips onto their head, and cant move whenver you select the tool. what do i do about this?

2 comments

0

why not make it so that it freezes the player (anchors) when they pull the tool out for like 2 seconds and then the player unfreezes.

0

doesn't help. just delays the inevitable

1 answer

try reseting the whole this and also re program that coding maybe because none of those have a proper code cyntax

1 comment

0

it says in the questoin title, [solved] also you spelled syntax wrong

This discussion is preserved as it was. New answers, comments, and votes are closed.