Minigame ui problem [URGENT]

deleted post by author --------------

I think of NetworkOwnership

Thing is the one who has NetworkOwnerShip over part is one who receives the singals physics of parts (like Touched and other physics for example), this is how it was setup in roblox.

You can use like workspace:GetPartsinPart but (it’s fire, not connection signal) so you need to make loop logic for it.

Or make attribute that is respone for GameStart (like 0 is not started game and 1 is started game) and there is other way.

Thanks to God.

1 Like

Could you update the script for me in that way? i apprechiate that a lot thanks..

I can’t.

image

1 Like

Oh.. thats the first time i see that. Okay then thanks

i turned into this, but it didn’t work. is it correct as you meant?


local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

local gameArea = workspace.LiveOrDie.Areas.GameArea
local textLabel = script.Parent

-- UI starts hidden
textLabel.Visible = false
textLabel.Size = UDim2.new(0, 0, 0, 0)

local effectTriggered = false

local function boingEffect()
	local finalScaleX, finalScaleY = 0.4, 0.15
	local overshootScaleX, overshootScaleY = finalScaleX * 1.2, finalScaleY * 1.2
	local speed = 0.1

	textLabel.Visible = true
	for i = 0, 1, speed do
		textLabel.Size = UDim2.new(finalScaleX * i, 0, finalScaleY * i, 0)
		textLabel.Position = UDim2.new(0.5 - textLabel.Size.X.Scale / 2, 0, 0.5 - textLabel.Size.Y.Scale / 2, 0)
		task.wait(0.02)
	end

	textLabel.Size = UDim2.new(overshootScaleX, 0, overshootScaleY, 0)
	textLabel.Position = UDim2.new(0.5 - textLabel.Size.X.Scale / 2, 0, 0.5 - textLabel.Size.Y.Scale / 2, 0)
	task.wait(0.1)
	textLabel.Size = UDim2.new(finalScaleX, 0, finalScaleY, 0)
	textLabel.Position = UDim2.new(0.5 - textLabel.Size.X.Scale / 2, 0, 0.5 - textLabel.Size.Y.Scale / 2, 0)
end

local function showInfoWithDelay()
	if effectTriggered then return end
	effectTriggered = true

	task.wait(5)
	boingEffect()
	task.wait(8)
	textLabel.Visible = false
end

-- Instead of .Touched, we check every 0.2s if player is inside GameArea
task.spawn(function()
	while true do
		if not effectTriggered then
			local parts = workspace:GetPartsInPart(gameArea)
			for _, part in ipairs(parts) do
				if part:IsDescendantOf(character) then
					showInfoWithDelay()
					break
				end
			end
		end
		task.wait(0.2)
	end
end)

Why don’t you just do a FireAllClients instead of checking who’s on the part a giving them the UI?
Feels way simpler.

But if you actually want the .Touched to work, just make the player spawn a bit higher than the original part (like 3-4 studs) so they’re sure to touch the part.

1 Like

it didnt work, now the ui text doesnt appear at all.
I created two scripts, one serverscript because apparently thats what you need to do FireAllClients,

Serverscript:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local showUIEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("ShowGameUI")

task.wait(5) -- wait 5 seconds after game starts
print("Firing event!") -- debug message
showUIEvent:FireAllClients() ```

localscript:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local showUIEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("ShowGameUI")
local textLabel = script.Parent

textLabel.Visible = false
textLabel.Size = UDim2.new(0, 0, 0, 0)

local function boingEffect()
	local finalScaleX, finalScaleY = 0.4, 0.15
	local overshootScaleX, overshootScaleY = finalScaleX * 1.2, finalScaleY * 1.2

	textLabel.Visible = true
	for i = 0, 1, 0.1 do
		textLabel.Size = UDim2.new(finalScaleX * i, 0, finalScaleY * i, 0)
		textLabel.Position = UDim2.new(0.5 - textLabel.Size.X.Scale/2, 0, 0.5 - textLabel.Size.Y.Scale/2, 0)
		task.wait(0.02)
	end

	textLabel.Size = UDim2.new(overshootScaleX, 0, overshootScaleY, 0)
	textLabel.Position = UDim2.new(0.5 - overshootScaleX/2, 0, 0.5 - overshootScaleY/2, 0)
	task.wait(0.1)
	textLabel.Size = UDim2.new(finalScaleX, 0, finalScaleY, 0)
	textLabel.Position = UDim2.new(0.5 - finalScaleX/2, 0, 0.5 - finalScaleY/2, 0)
end

showUIEvent.OnClientEvent:Connect(function()
	print("Client received event!") -- debug message
	task.wait(1) -- small delay
	boingEffect()
	task.wait(8)
	textLabel.Visible = false
end)

Why is your text label.Visible = false?

1 Like

Okay that fixed it to change that,

But when i change the scripts and add back what i had now the text doesnt appear at all, when i update the localscript to this:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local showUIEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("ShowGameUI")
local textLabel = script.Parent

-- start hidden + empty
textLabel.Visible = false
textLabel.Text = ""

-- boing animation
local function boingEffect()
	local finalScaleX, finalScaleY = 0.4, 0.15
	local overshootScaleX, overshootScaleY = finalScaleX * 1.2, finalScaleY * 1.2

	-- show + grow
	textLabel.Visible = true
	for i = 0, 1, 0.1 do
		textLabel.Size = UDim2.new(finalScaleX * i, 0, finalScaleY * i, 0)
		textLabel.Position = UDim2.new(0.5 - textLabel.Size.X.Scale/2, 0, 0.5 - textLabel.Size.Y.Scale/2, 0)
		task.wait(0.02)
	end

	-- overshoot
	textLabel.Size = UDim2.new(overshootScaleX, 0, overshootScaleY, 0)
	textLabel.Position = UDim2.new(0.5 - overshootScaleX/2, 0, 0.5 - overshootScaleY/2, 0)
	task.wait(0.1)

	-- settle
	textLabel.Size = UDim2.new(finalScaleX, 0, finalScaleY, 0)
	textLabel.Position = UDim2.new(0.5 - finalScaleX/2, 0, 0.5 - finalScaleY/2, 0)
end

-- when event fires, run animation + text
showUIEvent.OnClientEvent:Connect(function()
	print("CLIENT: received event")
	textLabel.Text = "HELLO FROM EVENT!"
	boingEffect()
	task.wait(8) -- visible for 8 seconds
	textLabel.Visible = false
end)

this one only works when i playtest with a single player

This is a dupe, pls dont make two of the same topics.

I haven’t they are two seperate things just similar problems. thank you for fully reading both posts but not helping tho.

1 Like