Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Not receiving values from remote event.. why?

So I sent in these values through a remote event

script.touchEvent:FireClient(game.Players[plr], p, 1, 2)

but when the client receives this, it gets this

Part nil nil

Does anyone know why?

The full script:

function fire(p)

local plr = script.Parent.Name

script.touchEvent:FireClient(game.Players[plr], p, game.Players[plr].leaderstats.Money.Value, game.Players[plr].leaderstats.Role.Value)

end

  

script.Parent.LowerTorso.Touched:Connect(fire)

2 answers

There is simply not enough information to answer your question but it seems you are trying to do a on touched event and you want it to act as a local value. What you can do is you can use game.PlayerAdded:Connect(function(plr), plr being what would be that. You can also make a variable in startergui and reference it when on touch. You can also load a folder when on touched tat contains all the scripts you need. Or make a script turn disabled to abled. Not everything needs to be a server script.

4 comments

0

I need this as a server script as a security check to see if the player has the right values

0

You can make a instance and make it a string value then parent it to the server script then do a if else statement from there, if string value.value = this then (code) else return false.

0

not sure what you really mean

0

Make a stringValue element then change it when you want to activate the confirmation, then it is just an if else statement

i figured out my problem, i was just being stupid lol

1 comment

0

Can you accept your answer to avoid confusion

This discussion is preserved as it was. New answers, comments, and votes are closed.