Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
518 views
in Technique[技术] by (71.8m points)

lua - How to make a give gui button on roblox studio?

i want to know how could i make a give gui button, For example, if I have a "textbutton" and I press it near another player, the button disappear from my gui and the other player has it? any idea how i do it?

pls i have searched everywhere and I can not find any solution..

How this works

My player has a "textbutton" in his gui, If i approach another player and I press my "textbutton" it is given to the other player and in my gui it disappears, how do I do that?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You don't find a solution because you're doing the same mistake 95% of all roblox guys and most other people posting here do. you're trying to find a solution to your very specific personal problem. but you have to break your problem down into atomic (very common) subproblems. Otherwise chances someone has done and documented the same online are close to 0.

  • Make a gui visible to specific player

  • Create a button

  • React to a button press

  • Find out who pressed the button

  • Calculate the distance between two players

  • Calculate the nearst player

  • Remove a button from the GUI

  • Add a button to the GUI

You will find plenty of information on how to solve these problems.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...