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 4 years ago

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

local 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 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
local ObjectValue = instance.new("ObjectValue",workspace);

ObjectValue.Value = game.Players.clashzone_fc

local Character = ObjectValue.Value.Character or ObjectValue.Value.CharacterAdded:Wait();
Ad

Answer this question