Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

annoying bug with parts? [solved]

Asked by
theCJarmy7 1293 Moderation Voter
8 years ago
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?

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. Conmmander 479 — 8y
0
doesn't help. just delays the inevitable theCJarmy7 1293 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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

0
it says in the questoin title, [solved] also you spelled syntax wrong theCJarmy7 1293 — 8y
Ad

Answer this question