So i have been making a house script for my shopping game for extra rp stuff. I have been doing a rough idea and now that i have got the actual system working i have started tidying stuff up a bit. Now that i have moved some parts and scripts around (obviously changing the scripts) its broke. Here is the main script in the proximity prompt to buy a house:
local h1 = script.Parent.Parent.Parent.Parent.Parent.House1.Number.Sign
local h2 = script.Parent.Parent.Parent.Parent.Parent.House2.Number.Sign
local h3 = script.Parent.Parent.Parent.Parent.Parent.House3.Number.Sign
local FS = script.Parent.Parent.Parent.ForSale
script.Parent.Triggered:Connect(function(plr)
if h1.SurfaceGui.Owner.Text == plr.Name then
return
elseif h2.SurfaceGui.Owner.Text == plr.Name then
return
elseif h3.SurfaceGui.Owner.Text == plr.Name then
return
elseif script.Parent.Parent.SurfaceGui.Owner.Text ~= "For Sale" then
return
else
script.Parent.Parent.SurfaceGui.Owner.Text = plr.Name
script.Parent.Enabled = false
for i = 1, 10 do
FS.Pole.Position = FS.Pole.Position + Vector3.new(0,-1.2,0)
FS.Sign.Position = FS.Sign.Position + Vector3.new(0,-1.2,0)
wait(0.02)
end
end
end)
h1 - house1
h2 - house2
h3 - house3
FS - for sale sign
Here is the workspace layout too:
(House2 and House3 are the same)
The main issue is when you trigger the ProximityPrompt, it does nothing. I have obviously fiddled around with stuff for more than a day now but still nothing - If anybody has a solution or suggestion feel free to comment! Any help is appreciated