Is there a way to move GUI by studs?

Is there a GUI plugin I don’t know of? Because I’m trying to make a crosshair and it’s awfully aligned. Here’s the image. I also wanna scale the bottom lines by it’s X axis, and the left and right ones by it’s Y axis.

Yeah, I know you can just select it and resize it by dragging it but this overlay is so annnoying!

Any help would be appreciated, thank you!

I think you can do this:

For the top line do:
AnchorPoint: 0.5, 1
Position: {0.5, -5},{0.5, 0}
Size: whatever size it is in that image

For the left line do:
AnchorPoint: 1, 0.5
Position: {0.5, -5},{0.5, 0}

For the bottom line do:
AnchorPoint: 0.5, 0
Position: {0.5, 0},{0.5, 5}

For the right line do:
AnchorPoint: 0, 0.5
Position: {0.5, 5},{0.5, 0}

Please tell me if there is something wrong with this
If you use this, the crosshair will have a space of 10 pixels in the middle

1 Like

I have a 2560x1080 computer, I dunno why this isn’t working
image

You should create a singular frame and have it centered in the middle of the screen. You can then create the other four frames and position them relative to the centered frame rather than the client’s current screen.

That’s very confusing, and I’m using the crosshair from the fe gun kit (non modified). You can find it in the gun, GunScriptLocal

You can change the player mouse to the crosshair, which would then (if I interpreted the dillema correctly) get the same effect, and be easier. You could do something like:

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxasset://SystemCursors/Cross"--That is a crosshairs icon by roblox
1 Like

In the FE gun kit, the crosshair is made by frames, and dissapears when you have the scope or zoom in, how am I supposed to replicate that but with a image? It also spreads a bit when you shoot. :confused:

Okay, here is what I would do. Instead of changing the mouse, Create an Image button. Change the picture to “rbxasset://SystemCursors/Cross”. Then, inside that gui, you can have a local script doing:

local CurrentMouse = game.Players.LocalPlayer:GetMouse()

local function move()
    crossFrame.Position = UDim2.new(0, CurrentMouse.X, 0, CurrentMouse.Y) -- crossFrame is your frame
end

game:GetService("RunService"):BindToRenderStep("MoveMouseGui", 1, move)

Then, when they scope, just make the frame invisible

crossFrame.Visible = false

and when they shoot, just tween the size

crossFrame:TweenSize(scaleX,offsetX,scaleY,offsetY)

Just do the opposite tween when they stop. All you would have to do is check what key the player was pressing, and call those effects. That should solve your problem, and be A LOT more maneagable than the FE gun scripts. Hope this helps :grin:

I suggest a mouse icon like @Infinite_Visions said.

I can’t, I’m using a gun system it won’t work.

I made a gun and used mouse icons.

It’s been a month, and that won’t work. I’m using FE gun kit and I want the custom crosshair to function like the built in one. But it’s all good I had it figured it out.

LATE REPLY

You can add ImageLabel to those frame
moving can only be done through Properties

I forgot about this post, but I realised you can change the crosshair size in the settings, also the crosshair is made by frames, and not an image. Adding an ImageLabel would most likely break the system. It’s a gun system, it’s fragile.