Question 1: How do I make a clickable GUI?
Question 2: How do I make said clickable GUI affect a part/union?
Question 1: How do I make a clickable GUI?
Question 2: How do I make said clickable GUI affect a part/union?
make a event in replicated storage called buttonclicked or something
in your gui button
local repstorage = game.replicatedstorage
local buttonevent = repstorage.FindFirstChild("buttonclicked")
function buttonClicked()
buttonevent:FireServer()
end
button.Activated:Connect(buttonClicked())
and then in your part
local repstorage = game.replicatedstorage
local buttonevent = repstorage.FindFirstChild("buttonclicked")
function changePart()
part = script.Parent
part.Transparency = 1
part.Size = Vector3(1000,1000,1000)
print("resized part")
end
buttonevent.OnServerEvent:Connect(changePart())
i havent actually tested this so if it works im a genius
It would be Vector3.new(1000,1000,1000)
when I put in the first script, button on the bottom had a red line is that supposed to be buttonclicked?
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
1)with a textbutton or an imagebutton
use event:FireServer() to fire a remote event and event.OnServerEvent(function()) to detect the event
You need to do research before you ask questions like these on scriptinghelpers. Learn the basics and hopefully you'll understand how lots of things work. But just coming on here and asking for us to tell you what to do/make a script is not going to teach you anything.
LoveSpeaksOutTruth, that attitude wont teach you anything.