How do you access "touchedman" in a formula
01 | function ontouch(hit) |
02 | local touchedman = game:GetService( 'Players' ):GetPlayerFromCharacter(hit.Parent) |
03 | if player then |
04 |
05 | game.Workspace.touchedman.Folder.BoolValue.Value = true |
06 |
07 | end |
08 | end |
09 |
10 | script.Parent.Touched:Connect(ontouch) |
1 | game.Workspace [ touchedman.Name ] .Folder.BoolValue.Value = true |
or you could use touchedman.Character (if its their character)
1 | touchedman.Character.Folder.BoolValue.Value = true |
Not sure if I understand your question correctly but:
1 | script.Parent.Touched:Connect( function (obj) |
2 | workspace [ obj.Parent ] .Folder.BoolValue.Value = true -- Goes into workspace and tries to find the player who touched the object |
3 | end ) |