I forgot the script.... xD
function test()
local player = script.Parent.Parent.Parent.Parent
game.Lighting.chest.Name = script.Parent.Value.Value
script.Parent.Value.Value = player.Name
game.Lighting.Value.Value = player.Name
game.Lighting(Value.Value):clone().Parent = game.Workspace
for i, v in pairs (game.Workspace:GetChildren()) do
if v:IsA("Part") then
if v.Name == player.Name then
game.Workspace(player).Position = player.Head.Position
end end end end
script.Parent.MouseButton1Down:connect(test)
error:
19:13:26.528 - Players.Player1.PlayerGui.Test.TextButton.Script:6: attempt to index global 'Value' (a nil value)
19:13:26.528 - Stack Begin
19:13:26.529 - Script 'Players.Player1.PlayerGui.Test.TextButton.Script', Line 6 |