Greetings!
I’m currently having trouble with my script. So, I’ve made a Beverage Machine that when a player touches the machine, a Gui will appear.
I’m using the PlayerGui to tween the Gui, it was working before but I tried it earlier, the Gui now appears on every player’s screen. I also used a LocalScript for the tweening of the Gui and the LocalScript is inside the Gui. Please see the screenshots below:
LocalScript:
local player = game.Players.LocalPlayer
game.Workspace.BeverageTouch.Touched:Connect(function(Hit)
if Hit.Parent.Name == "Empty Beverage Cup" then
player.PlayerGui.BeverageGUI.Frame:TweenPosition(UDim2.new(0.5, 0,0.499, 0))
end
end)
Now I’m trying to figure out why it’s appearing on everyone’s screen.
Hopefully, it will be figured out soon, your advice will be very much appreciated.
Thank you!