So I've been working on a train system. I've gotten a throttle GUI, and a speed that sticks for better gameplay. Currently I've been using a keybind horn I found on devfourums. But my friend hux is a mobile guy and I want this to work on mobile. So I need a GUI! I've tried for hours trying to get this to work. I mean, it seems simple. Text button, and then some code and a sound. But once I started. Hell. Hell. The only one I could get working was like way to server. It was the game playing it and not the seat. If anyone has ideas for this please! I'm desperate. (I searched the toolbox, even tried AI as a last resort!
Didn't do notin. Just made it worse.) *So please. ANY ideas tell me!
#train horn gui
1 messages · Page 1 of 1 (latest)
just got an idea. a button that makes the player press H. gonna try that (still if y'all got ideas I need them. I do not think this will work
Hey! Just use a TextButton in a ScreenGui, then hook it up like this:
local button = script.Parent
local hornSound = workspace:WaitForChild("TrainHorn")
button.MouseButton1Click:Connect(function()
hornSound:Play()
end)
Make sure the sound is in workspace, and the GUI is visible on mobile. If the sound needs to come from the train, you might need a RemoteEvent. Let me know if you need that too!
Hop it helps!
thanks for helping. after I read (and tested) it did the thing I said where I can be 2000 studs away and still here it broad as daylight!
*hear