#need to get a script
35 messages · Page 1 of 1 (latest)
-- Variables
local part = script.Parent -- The part that players touch
local messageService = game:GetService("ReplicatedStorage"):WaitForChild("MessageService") -- A RemoteEvent for announcements
-- Ensure a RemoteEvent exists in ReplicatedStorage
if not messageService then
messageService = Instance.new("RemoteEvent", game:GetService("ReplicatedStorage"))
messageService.Name = "MessageService"
end
-- Function to handle when the part is touched
local function onTouch(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- Check if a player touched the part
if player then
-- Announce the player's win to the server
messageService:FireAllClients(player.Name .. " has won the game! Congratulations!")
end
end
-- Connect the function to the Touched event
part.Touched:Connect(onTouch)
Sigma for using AI on blunt question
👍🏽
So simple right
Yeah
ai is sometimes clutch
Idk why people ask here instead of first searching up or using ai
some people have no idea about ai
True
Yo you want to see the game I used to work on
Sure
Go to dms rq
Because you shouldn’t be relying on AI
Scripting with your own intelligence is better
the ai just leads to me questioning why im even doing this bc its so annoying
I didn't say to rely on it, but
when asking such a simple question
They should honestly use other sources first
It makes it easier for all of us
Ai is helpful if you ask the right questions
Instead of, say, asking it to create a script for you, ask it to correct ur script
Its not too good at making whole systems
Meh, I rather check on the documentation
You should learn how it works and start using it too
Well that's cuz u know how to script, foe those who don't, use AI or search it up first
It's absolutely not related
It's not that hard to type something which you don't know and read some text
That's how you use the documentation