|
| 01 Sep 2016 08:07 PM |
So I'm trying to make a resizable part WITH filtering enabled on. In startergui, I have a screen gui, and in that screen gui i have a handles object, and in the handles object I have a local script with the following code...
local handles, origin = script.Parent, 0 handles.Adornee = game.Workspace.Part handles.MouseDrag:connect(function(norm, dist) local delta = (math.floor(dist - origin / handles.Adornee.ResizeIncrement + .5) * handles.Adornee.ResizeIncrement) game.ReplicatedStorage.Resize:FireServer(game.Workspace.Part, norm, delta) end) handles.MouseButton1Down:connect(function() origin = 0 end)
now in a script in serverscriptservice i have the following code...
remote = game:GetService("ReplicatedStorage"):WaitForChild("Resize")
remote.OnServerEvent:connect(function(plr, part, id, delta) -- ?????????????????? end)
Now where you see the question marks, I'm kind of confused as to what code needs to be there to actually resize the part. ################# |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 02 Sep 2016 10:15 PM |
why do you need to fire server
everything should be done locally since its a gui
unless im misunderstanding what you're doing
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 10:25 PM |
He needs the remote so the part's new size will replicate to other clients.
@OP
Your parameters are fine as long as they're defined. Resize the part in the serverScript with part.Size = newsize, etc. That's a pseudocode BTW.
You can use the values the local script sent on the server, and manipulate the part with that data. |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 02 Sep 2016 10:26 PM |
oh its a part i thought he was resizing guis
that must be my sign to go to sleep
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2016 10:46 PM |
I'm dumb, and still kind of new to fe. Could someone please post the exact code that would need to be in the serverscript...?
|
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Sep 2016 09:03 AM |
| FE requires that you handle all the events that you want replicated to other clients on the server, and only handle things on the client if it can only be done on the client. This includes animations, GUIs, and camera manipulation. Much more to it but that's the really basic gist. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2016 12:13 PM |
| i understand that, but I don't completely understand the code needed to make a resizable part in general. I was wondering if you could show me the exact code that would need to be in the serverscript. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|