How to get a suggestion like in a module script but instead is on a remote event

hello im amaro and i was wondering something in remote events.

when you make a remote event and put a string in the function, usually something like this

game.ReplicatedStorage.remote.OnServerEvent:Connection(function(player, something)
   if something == "hello" then
      print("hello".. player.Name)
   end
end)

local script:

local remote = game.ReplicatedStorage.remote

remote:FireServer("hello") --need to be typed

is there other alternative for make the “hello” suggested when you typing a string on the fireserver? like a function on a module script.

sorry if explaining bad, idk how to call some stuff when coding, like this

local bruh = "stuff" -- the "stuff" is a string? or something else called?
3 Likes

Like to suggest the word ‘hello’ when you’re writing the argument in the :FireServer? or suggest that it must be a string?

2 Likes

yes, the first one, getting suggested the word “hello” when you’re writing the argument in the :FireServer

1 Like

Not really sure how or if that’s possible. Why would you want to have it suggest stuff though? If you’re inputting the argument yourself inside the script then I don’t think that’s necessary.

1 Like

i mean is just for learning about it, and making the progress for scripting more easily and not having copy and paste the same argument in diference scripts

1 Like

Well, I never really found that to be an inconvenience. It’s best that it’s your code that you try and optimize so you reduce the redundancy. There might be more efficient ways to do what you’re trying to achieve.

1 Like

ahh maybe, i mean, i was wondering that bc im re making the hitbox on the project that im doing, basicly im switching the hitbox detection to server side to client side, and making the damages and the other silly things on the server side

1 Like

What arguments are you passing inside your remoteEvents for it to be redundant though?

1 Like

uhhhhh like arguments first are like:

player = player ofc dah
dmg = number, how much damage is dealing
debtime = how much time is the knocback on the enemy before is deleted with debris (bodyvelocity)
bodyfire = the knockback direction, like "HumanoidRootPart.CFrame.LookVector * 50
soundid = the sound id for the hit sound
partt = part position for making the hitbox weld, can be like the right arm of the character
cframee = how much CFrame on the C0 on the hitbox part
sizee = size of the hitbox like, Vector.new(4,4,4)
strongornah = this is for the hit effect, is if is “normal” or “strong” makes differents particless
ragdoll = this to make if the hit makes you ragdoll or nah
stuntime = how much stun haves

1 Like

i could say is the mayority of the arguments that i usually use for the hitbox

1 Like

oh and i forgort one more, but is something for make it comboeble?? like if is the enemy on the air you can hit him but if is on the ground (ragdolled) you cant hit him

1 Like

You could probably have those values set up in a table or something that’ll collect all of that and just have the arguments of the :FireServer grab it from there.

1 Like

I don’t believe that there is a way to achieve it unfortunately. You might be able to do it by making use of types though.I’ll investigate it a bit.

1 Like

now you mentionet, do you know how to make a table and put those values on the :FireServer arguments?

1 Like

oooooooooooooooohhhhhhhhhhhhhhhhhhhhhhhhhhh okkkkkkkkkkkkkkkkkkkkkkkkkkk
ill we wait if you could investigate it

1 Like

Doesn’t seem doable. Closest I could get is by having a function which then fires the remote event, like this:

local RemoteEvent = game.ReplicatedStorage.RemoteEvent

function CallA(something: "hello" | "bye")
	RemoteEvent:FireServer(something)
end

CallA()

1 Like

mmh i mean is i like it ngl, so is usefull ^^

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.