Hello!
I would like know how to Send a RemoteEvent with values without using value Instances. Can you help me please?
What do you mean, can you explain more, maybe with an example?
I would like send RemoteEvent with value like an Instance or a Int value but without using value instance? Did you know?
How exactly do you want to send it? I believe you have your remote event situated in ReplicatedStorage, couldn’t you just send the variable which has the reference to the remote event with another Remote Event?
@WaterJamesPlough I think he means that he wants to send an InstanceValue like StringValue, ObjectValue, and more.
@Azerty_103 You can just send the Value property of the InstanceValue to the RemoteEvent.
If we’re talking about an InstanceValue (Bool, Number, Int) then
--Server
local RandomIntValue = game.Workspace.IntValue
local Event = game.ReplicatedStorage:WaitForChild("Event")
Event:FireServer(RandomIntValue) --That will be passed from the client to the server, but not as an actual value property I think
And then you can just do whatever you’d like on the server code when you connect OnServerEvent
but this is just a small example (Make sure OnServerEvent
is connected with the argument in your client script as well)
On your server code do something line
Event.OnServerEvent:Connect(function(Var1, var2, var3)
print(Var1,var2,var3)
end)
and when you fire the remote just fire it with those variables filled