I know this is not a request site but I have a script that takes an object value and uses it for a location (at the bottom). I was wondering if it is physically possible to turn that value of the objectvalue into a string value. My issue is the objectvalue holds a player name but the player name is an objectvalue so I can't use it for finding a location (if this is too confusing just ask for me to explain and I will).
Well here is the code, it is pretty much pointless, you don't even need to look at it:
rewardmessage = game.Lighting.KillerReward
script.Parent.Zombie.Died:connect(function()
if script.Parent.Zombie.Health == 0 then
local killer = script.Parent.Zombie.creator
print(killer.Value)
local killervalue = Instance.new("BoolValue", script.Parent)
killervalue.Value = killer.Value
local rewardclone = rewardmessage:clone()
rewardclone.Parent = game.Players[killer.Value].PlayerGui.MainScreen
if game.Players[killer.Value].PlayerGui.MainScreen.PlayerValues.HasCoinBooster.Value == true then
rewardclone.CoinReward.Text = "+2 coins"
if game.Players[killer.Value].PlayerGui.MainScreen.PlayerValues.HasXPBooster.Value == true then
rewardclone.XPReward.Text = "+10 XP"
else rewardclone.XPReward.Text = "+5 XP"
end
else
rewardclone.CoinReward.Text = "+1 coin"
if game.Players[killer.Value].PlayerGui.MainScreen.PlayerValues.HasXPBooster.Value == true then
rewardclone.XPReward.Text = "+10 XP"
else
rewardclone.XPReward.Text = "+5 XP"
end
end
end
end)

1 comment
Seems to work, thanks!