#train horn gui

1 messages · Page 1 of 1 (latest)

gleaming bronze
#

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! evilcat Didn't do notin. Just made it worse.) *So please. ANY ideas tell me!

#

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

hearty yoke
#

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!

gleaming bronze
#

*hear