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:
01 | function fire(p) |
02 |
03 | local plr = script.Parent.Name |
04 |
05 | script.touchEvent:FireClient(game.Players [ plr ] , p, game.Players [ plr ] .leaderstats.Money.Value, game.Players [ plr ] .leaderstats.Role.Value) |
06 |
07 | end |
08 |
09 | |
10 |
11 | script.Parent.LowerTorso.Touched:Connect(fire) |
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.
i figured out my problem, i was just being stupid lol