#Remotes somehow not working

70 messages · Page 1 of 1 (latest)

near nova
#

either roblox is special or i am

#

ok so

#
    block[plr] = part1
    print(block[plr])
    if part1 then
    cameraremote:FireClient(plr,part1,"test123")
    print(part1)
    end```
#

prints out:

#

the part

#

the part

#

so block[plr] (which is set to part1) is correctly set

#

same with it printing part1

#
cameraremote.OnClientEvent:Connect(function(part,value)
    print(part, value)```
#

client

#

SOMEHOW PRINTS

#

nil test123

#

yes the part is accesable by client. as its in folder in workspace

lament moat
#

ok so the first parameter is always the player when using onClientEvent

near nova
#

dont think thats correct bud

lament moat
#

so do plr,part,value

near nova
#

when u ffire server

#

its indeed a player

#

but when u fire client its not

lament moat
#

🙏 you are using client event

near nova
#

yes.

#

on

#

client

#

u get player as first argument, when u do .onserverevent

lament moat
#

client to client

near nova
#

no

#

server to client

lament moat
#

ohhh

near nova
#

mb for not being clear

lament moat
#

mb bro

#

oh the paramters go in order i think

#

not by variable name

near nova
#

well am reciving them in correct order

#

aint i

kind gate
#

Is the local script deleting that part somehow? That’s kinda the only reason I can think of

near nova
#

its still there

#

and

#

i can access the part

#

but doesnt wanna be sent thro remote somehow

kind gate
#

Does it print the part on the server?

near nova
#

yup

#

part is located in workspace.folder

#

and its called plr.UserId

#

and

#

i can get it by doing workspace.folder:WaitForChild(player.UserID)

#

no problem

#

it just refuses to be sent thro remote

kind gate
#

I guess just send the part name into the remote then find it on the client

lament moat
#

does the part even exist

#

on client side

near nova
#

yup

#

like i said

near nova
#

ServeR: (DONT MIND THE NAMES)
proximy.Triggered:Connect(function(plr)
    local part1 = sigmapart:Clone()
    part1.Name = plr.UserId
    part1.Parent = rockets
    block[plr] = part1
    print(block[plr])
    if part1 then
    cameraremote:FireClient(plr,part1,"test123")
    print(part1)
    end
end)```
prints out the part twice

client:
```lua
cameraremote.OnClientEvent:Connect(function(part,value)
    print(part, value)
    print(workspace.Rockets:WaitForChild(player.UserId))```

First print = nil test123
2nd print = prints it fine
#

shit weird

lament moat
#

does the client code have any other variable with the same name? i dont know bro

kind gate
#

Yeah this is a weird issue haha

near nova
#

ye idfk

#

ill just not send the part

#

and get it by workspace

kind gate
#

Alright

near nova
#

just dont get why shit doesnt work

#

never had issue like that

humble tulip
near nova
#

i do not use ai

humble tulip
#

The other reason could be because studio is bad and just close studio and open it again

near nova
#

i tried

#

still nothing