make a event in replicated storage called buttonclicked or something
in your gui button
1 | local repstorage = game.replicatedstorage |
2 | local buttonevent = repstorage.FindFirstChild( "buttonclicked" ) |
4 | function buttonClicked() |
5 | buttonevent:FireServer() |
8 | button.Activated:Connect(buttonClicked()) |
and then in your part
01 | local repstorage = game.replicatedstorage |
02 | local buttonevent = repstorage.FindFirstChild( "buttonclicked" ) |
07 | part.Size = Vector 3 ( 1000 , 1000 , 1000 ) |
11 | buttonevent.OnServerEvent:Connect(changePart()) |
i havent actually tested this so if it works im a genius