Hi, i’ve been wanting to add some sort of story telling into my game Mossy Grove .
I want the script to do its thing after touching a part, but it seems to just go off when you are under the original position of the part, i tried chaning some of the numbers in the script but it wont work.
Here is the script, i found it somewhere online:
local locations = game.Workspace.Locations
local label = script.Parent
local location = nil
while wait (1) do
for i, V in pairs(locations:GetChildren()) do
local min = Vector3.new(V.Position.X - (V.Size.X / 2), V.Position.Y - 100, V.Position.Z - (V.Size.Z / 2))
local max = Vector3.new(V.Position.X + (V.Size.X / 2), V.Position.Y, V.Position.Y, V.Position.Z + (V.Size.z/ 2))
local region = Region3.new (min, max)
for _, player in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
if player.Parent:FindFirstChild('Humanoid') then
if location ~= V.Name then
location = V.Name
label.Text = location
label.TextColor3 = V.color
for i = 1, 100 do
label.TextTransparency = label.TextTransparency - 0.01
label.TextStrokeTransparency = label.TextStrokeTransparency - 0.01
wait (0.01)
end
wait (3)
for i = 1, 100 do
label.TextTransparency = label.TextTransparency + 0.01
label.TextStrokeTransparency = label.TextStrokeTransparency + 0.01
wait (0.01)
end
elseif location == V.Name then
end
end
end
end
end
If you know how to fix this, please reply to my post.