Hi, i wanted to ask how could i get the player WITHOUT using touch, i tried using playerAdded but it just doesnt work hers the script:
local Fold = game.Workspace:WaitForChild("tycoon1")
local SC = game.ReplicatedStorage.SC
script.Parent.Touched:Connect(function(hit)
if hit.Name == Fold.DropType.Value then
hit:Destroy()
SC:FireClient()
end
end)
oh, i see, ignore my previous post (now deleted). In that case, how is the part assigned to the player? you will need to implement some kind of custom logic but it can be as simple as a linear search depending on your data structure.
well if it doesnt get the player based off of the character that hit the part (or any of the character’s parts at all) then you must have some kind of system where there’s another part that is associated with the player. I’m just asking for info about that system.
Unless you are relying on the character or any of the character’s parts.
Yeah it will works only when Owner Value is written not nil
I think its dropper’s script
local Fold = game.Workspace:WaitForChild("tycoon1")
local SC = game.ReplicatedStorage.SC
script.Parent.Touched:Connect(function(hit)
if hit.Name == Fold.DropType.Value then
hit:Destroy()
SC:FireClient()
end
end)
okay here we go, So bassicly i the script is located in the collecter part that collects the parts that the dropper drops, its in a server script, And the remote event is needed to send to the client so the player can recive the cash, i dont have a owner value but i will prob intergrad it
if you’re giving the player the cash via a LocalScript, it won’t replicate back to the server, basically the client will think it has a different amount of money to what the server thinks that player has.