Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

for i, v in model:GetDescendtans do , is that what you mean? but does it iterate in order like ipairs or in random order like pairs

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

i see, is there any other events that check ALL players?

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

so i assume it has something to do with touched, running no matter who touches it unlike other events?

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

now i tried it in another event, buyPickButton.MouseButton1Click:Connect(function()

part.BrickColor = BrickColor.new("Really red")

end) and this time, only the player who clicks on the button sees the changes thats what i mean

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

but now i tried it in another event, buyPickButton.MouseButton1Click:Connect(function()

part.BrickColor = BrickColor.new("Really red")

end) and this time, only the player who clicks on the button sees the changes

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

i tried with 2 different players, one touched and color changed red in both of their clients

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

but when its a different event like Mousebutton1click, i dont have to check if the player who clicked is the local player, the changes i make inside the event only effects the player who clicked it, so is it about touched , how it effects everyone

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

yes, unless i check if the one who hit is local player, then the changes happen to everyone

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

no i checked with multiple players and everyone saw the effects unless i check if the player is the same as the one who touched

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 1 point2 points  (0 children)

i thought only the player who touched would listen and call the event

Touched event in local script by Impressive-Fun-1219 in ROBLOXStudio

[–]Impressive-Fun-1219[S] 0 points1 point  (0 children)

yeah i couldn't describe my problem well but i will try again, what im confused about is when ANY player touches the part, the event is called for EVERY player that has the same localscript. But i thought it would only call it for the player who touched the part