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

How would you get a Character with using ObjectValue?

Asked by 5 years ago

Trying to get a character from a ObjectValue. I'm working on a mission system.

1local test = game.Workspace:FindFirstChild(Squad1.Player1.Value)  --Player1 being the objectvalue.

However this doesn't work, any ideas?

0
local test = Squad1.Player1.Value.Character Azarth 3141 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
1local ObjectValue = instance.new("ObjectValue",workspace);
2 
3ObjectValue.Value = game.Players.clashzone_fc
4 
5local Character = ObjectValue.Value.Character or ObjectValue.Value.CharacterAdded:Wait();
Ad

Answer this question