Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Not receiving values from remote event.. why?

Asked by 5 years ago
Edited 5 years ago

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

Log in to vote
0
Answered by 5 years ago

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.

0
I need this as a server script as a security check to see if the player has the right values ice_bearz 36 — 5y
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. ClockWallie 28 — 5y
0
not sure what you really mean ice_bearz 36 — 5y
0
Make a stringValue element then change it when you want to activate the confirmation, then it is just an if else statement ClockWallie 28 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

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

0
Can you accept your answer to avoid confusion ClockWallie 28 — 5y

Answer this question