So, i’ve making a game, but i dont know how i make a thing.
I wanna make a Wire GUI like this:
But i dont know how to make and start doing that.
Sorry, i’m am little bad on script.
Theres a video for a better view.
I wanna make a Wire GUI like this:
Sorry, i’m am little bad on script.
Theres a video for a better view.
You could put an attachment in the middle of the window. The attachment must be named “Attachment”, Then use a loop like this:
local distance = 10 --how far they need to be
local part = script.Parent
local beamid = "" --If you want you can change this to a beam id
wait(7)
while wait(0.3) do
for i, v in pairs (game.Players:GetChildren()) do
if (v.Character.HumanoidRootPart.Position - part.Position).Magnitude < distance then
if not v.Character:FindFirstChild("BeamThingy") then
local beam = Instance.new("Beam",v.Character)
beam.Name = "BeamThingy"
beam.Attachment0 = v.Character.HumanoidRootPart.RootRigAttachment
beam.Attachment1 = part.Attachment
if beamid ~= "" then
beam.texture = beamid
end
end
else
if v.Character:FindFirstChild("BeamThingy") then
v.Character:FindFirstChild("BeamThingy"):Destroy()
end
end
end
end
where i put it? i’m dumb lol .-.
Put this in a normal script. Then make this script a direct child of the part you want to walk up to. Change the distance to whatever you want. Now it’s important that you put an attachment into the part, and you name it “Attachment”. If it doesn’t work, check the output and let me know if there are errors. I might have made a mistake but I can fix it if there are any problems.
yep, thats a error.
I’m gonna try this in my own game, I’ll get back to you when I fix it.
ok, thank you :).
i appreciate your help.
Alright, try it now. I changed the code slightly so just recopy it and try again. It worked on my end!
aww thank youuuu! thats really worked.
ah, also, can i resize that?
Glad to hear it . If you want to change the anything the beam’s color or anything you can.
Under this line:
beam.Attachment1 = part.Attachment
You can add code like:
beam.Color = Color3.fromRGB(100, 100, 100) --put in 3 numbers 1 - 255
beam.Width0 = 0.3 --how wide start is
beam.Width1 = 0.3 --how wide end is
beam.FaceCamera = true --if you want the beam to rotate to face the camera
thank you.