Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

So this is for a cup fill up How do I make water apper in it? (read desc!)

Asked by 4 years ago
Edited 4 years ago

So line 9 is what is not working! I would like that to turn visible to people after it runs the rest of the script how do I do this??


function tch(h) if (h.Parent.Name == "Cup") then h.Parent.Name = "Water" script.Parent.Sound:Play() script.Parent.Parent.Spill.Transparency = 0.5 wait(0.5) script.Parent.Parent.Spill.Transparency = 1 wait(2) game.StarterPack.Cup.D1.Transparency = 0 end end script.Parent.Touched:connect(tch)
0
if you want it visible then the transparency needs to be 0 and not 1, maybe you meant invisible but that might be your problem. NvidiaGeForce2080Ti -5 — 4y
0
DUH!!! im so Dumb thank you xD JuzeyPlayz -83 — 4y
0
Wait that did not work! JuzeyPlayz -83 — 4y
0
are you getting an error or is it just not showing up for people? NvidiaGeForce2080Ti -5 — 4y
View all comments (3 more)
0
No Error at all output is clean and so is script its just not showing up in the cup its just a part I added in the cup that is suppose to turn visible after they put it by the water giver. JuzeyPlayz -83 — 4y
0
@NvidiaGeForce2080Ti JuzeyPlayz -83 — 4y
0
I have no idea then NvidiaGeForce2080Ti -5 — 4y

2 answers

Log in to vote
0
Answered by
zomspi 541 Moderation Voter
4 years ago
function tch(h)
if (h.Parent.Name == "Cup") then
h.Parent.Name = "Water"
script.Parent.Sound:Play()
script.Parent.Parent.Spill.Transparency = 0.5
wait(0.5)
script.Parent.Parent.Spill.Transparency = 1
wait(2)
game.StarterPack.Cup.D1.Transparency = 0
end
end

script.Parent.Touched:connect(tch)
Ad
Log in to vote
0
Answered by 4 years ago

It shouldn't be Starterpack, it should be their backpack. Starterpack will only load on spawn, while backpack is their current pack. Backpack can be really useful to give items to them or change the items. So it would be:

function tch(h)
if (h.Parent.Name == "Cup") then
h.Parent.Name = "Water"
script.Parent.Sound:Play()
script.Parent.Parent.Spill.Transparency = 0.5
wait(0.5)
script.Parent.Parent.Spill.Transparency = 1
wait(2)
game.Players.LocalPlayer.Backpack.Cup.D1.Transparency = 0 --I changed this line only
end
end

script.Parent.Touched:connect(tch)

Hope it works!

0
It did not work I dont know why there is no error in the output! but its not working I even tried the other way making it disapear but nothing so whats going on :( JuzeyPlayz -83 — 4y
0
Well this is tricky... I can't think of a solution other than that, but make sure you use Backpack instead of StarterPack in the future. I hope you can find an answer! fighterkirbyzx 102 — 4y

Answer this question