So imma cut right to the chase and show the code:

view source

01 local ownerValue = script.Parent.Parent.Parent.Parent.Values:WaitForChild("Owner", 5).Value 02 03 script.Parent.Touched:Connect(function(touched) 04 if touched.Parent:FindFirstChild('Humanoid') and ownerValue == nil then 05 script.Parent.BillboardGui.TextLabel.Text = touched.Parent.Name .. "'s tycoon" 06 script.Parent.Color = Color3.fromRGB(0, 255, 0) 07 08 ownerValue = touched.Parent 09 print(ownerValue) 10 end 11 end) That is the script that makes a value called "Owner" the person who touches the claim door

view source

01 script.Parent.MouseClick:Connect(function(who) 02 if game.Workspace.Tycoons.AttackOnTitan.Values.Owner.Value == who.Character then 03 print('hi') 04 05 local cash = Instance.new('Part') 06 cash.Name = 'Block' 07 cash.Color = Color3.fromRGB(0, 0, 255) 08 cash.Size = Vector3.new(1, 1, 1) 09 cash.CFrame = script.Parent.Parent.Parent.DropPart.CFrame 10 cash.Parent = workspace 11 12 local sellAmount = Instance.new('IntValue') 13 sellAmount.Value = 3 14 sellAmount.Name = 'SellFor' 15 sellAmount.Parent = cash 16 else 17 print(who.Name) 18 end 19 end) This is the script for the manual dropper to gain cash and it only works with the "else" statement. I been trying all day. (BTW im reteaching myself to code so a little bit of description would be helpful)

1 comment

0

Please reformat your post to include the code inside a code block (The little lua button). Trying to decipher your code and line numbers, while its unformatted is just a headache