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

[HELP]Brick spawn being interfered with sword?

Okay so here is what i want to happen when i press the button 'F': http://imgur.com/leeZIAU this works fine, however when i press it with my sword equiped(so when its a child of the character) this then happens: http://imgur.com/QWsLK8D Here is the code for the brick spawn:

local mouse = game.Players.LocalPlayer:GetMouse()
local player = game.Players.LocalPlayer

function Ability()
	if player.Character then
		local Character = player.Character
					local Brick = Instance.new("Part",game.Workspace)
					Brick.CanCollide = false
					Brick.Anchored = true
					Brick.Size = Vector3.new(1,1,1)
					Brick.BrickColor = BrickColor.new("New Yeller")
					Brick.Transparency = 0.5
					Brick.TopSurface = Enum.SurfaceType.Smooth
					Brick.CFrame = Character.Head.CFrame
						for r = 1,13,1 do
								wait()
							--Brick.CFrame = Character.Head.CFrame
							Brick.Size = Vector3.new(r,r,r)
						end
				Brick:Destroy()
		end
end

mouse.KeyDown:connect(function(key)
	key = key:lower()
	if key == "f" then --Change this to any Keys but I reccomand leaving it as [F] key.
		Ability()
	end
end)

I was wondering why this happens, espiecially as the sword is not collidable thanks for any help ~Bubs

1 answer

The issue is that your BillboardGui is not set to always be on top. To do this, all you have to do is set the BillboardGui's AlwaysOnTop property to true.

1 comment

0

i did this, and nothing seemed to happen

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